Skip to content

Telegram streaming=partial causes duplicate messages on edit failure #40746

@M-Lietz

Description

@M-Lietz

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

  1. Set channels.telegram.streaming = "partial"
  2. Send a message that results in a longer response (triggering multiple edits)
  3. 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 retry for the edit call before falling back
  • Or: expose a previewCleanup: true/false config option

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions