Skip to content

Telegram delivery-mirror duplicates every assistant text message (both openai-completions and delivery-mirror delivered to channel) #87994

Description

@guccio87

Describe the bug

When an agent sends a text response, both the openai-completions response AND the delivery-mirror entry are delivered to the Telegram channel, causing every message to appear twice.

Steps to reproduce

  1. Configure an agent with Telegram channel (dedicated bot account)
  2. Send a message to the agent
  3. Agent responds with text (not via message tool, just normal assistant response)
  4. Both the assistant response AND a delivery-mirror duplicate arrive on Telegram

Expected behavior

Only ONE message should be delivered to Telegram per turn.

Actual behavior

Every assistant text message appears twice on Telegram. The session JSONL shows:

  • 1st entry: role=assistant, api=openai-completions, model=deepseek-v4-pro
  • 2nd entry: role=assistant, api=openai-responses, model=delivery-mirror

Both are delivered to the channel.

Environment

  • OpenClaw version: 2026.5.22 (a374c3a)
  • Channel: Telegram (dedicated bot per agent)
  • Agent: any (tested with alice, sofia)
  • The duplication ratio varies: alice 49/312 (16%), sofia 1/22 (5%)

Additional context

This might be related to the message tool behavior — when the agent uses the message tool to send a file, the delivery-mirror re-delivers the PREVIOUS text message after the file. This suggests the delivery-mirror is queued and fires when subsequent tool calls complete.

Workaround: instruct the agent to never send text before a photo, and use NO_REPLY after the message tool. But this doesn't fix the root cause and breaks normal text-only conversations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions