-
-
Notifications
You must be signed in to change notification settings - Fork 69.3k
Telegram streaming=partial causes duplicate messages on edit failure #40746
Description
Bug Report
OpenClaw version: 2026.3.7
Channel: Telegram (DM)
Streaming mode: partial
Behavior
When channels.telegram.streaming is set to partial, OpenClaw sends a preview message and edits it live while generating. When Telegram rejects the edit (likely due to rate limiting or timing), OpenClaw falls back to sendMessage — but the original preview message is not deleted, resulting in two identical messages in the chat.
The docs state:
If native draft transport is unavailable/rejected, OpenClaw automatically falls back to sendMessage + editMessageText.
However, the cleanup of the preview message appears to fail silently, leaving both messages visible.
Steps to Reproduce
- Set
channels.telegram.streaming = "partial" - Send a message that results in a longer response (triggering multiple edits)
- Observe duplicate messages in Telegram DM
Expected Behavior
If the edit fails and fallback kicks in, the preview message should be deleted before the final message is sent.
Workaround
Setting streaming = "off" or "block" avoids the issue.
Suggestion
- Add cleanup/delete of preview message before fallback sendMessage
- Or: add a configurable
retryfor the edit call before falling back - Or: expose a
previewCleanup: true/falseconfig option