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
- Configure an agent with Telegram channel (dedicated bot account)
- Send a message to the agent
- Agent responds with text (not via message tool, just normal assistant response)
- 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.
Describe the bug
When an agent sends a text response, both the
openai-completionsresponse AND thedelivery-mirrorentry are delivered to the Telegram channel, causing every message to appear twice.Steps to reproduce
delivery-mirrorduplicate arrive on TelegramExpected 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:
role=assistant, api=openai-completions, model=deepseek-v4-prorole=assistant, api=openai-responses, model=delivery-mirrorBoth are delivered to the channel.
Environment
Additional context
This might be related to the
messagetool behavior — when the agent uses themessagetool 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.