Skip to content

[Bug]: Telegram DM can re-show a stale draft preview after the final reply is already delivered #40750

@dustookk

Description

@dustookk

Bug type

Behavior bug (incorrect output/state without crash)

Summary

In Telegram direct messages with partial streaming enabled, OpenClaw can already finish and display the final reply, but then an older draft preview can reappear afterward. In the Telegram client, that stale preview is shown as a pinned-message-style banner at the top of the chat

Steps to reproduce

  1. Configure a Telegram bot account with channels.telegram.streaming: "partial".
  2. Start a Telegram direct-message conversation with the bot.
  3. Send a prompt that produces multiple streamed partial updates.
  4. Wait until the bot has already displayed the complete final answer in chat.
  5. Observe that an older draft preview may appear again after the final answer is already visible.
  6. If the user dismisses/unpins that top banner, it can reappear while late draft/partial updates are still being processed.

Expected behavior

After the final reply is visible, no older draft or partial preview should reappear.

Actual behavior

The final reply is delivered successfully, but then a stale earlier draft preview can still be emitted afterward. In Telegram DM this appears as a pinned-message-style banner at the top of the chat, which makes it look like the bot resumed an old draft after it had already finished.

OpenClaw version

2026.3.7

Operating system

Debian GNU/Linux 11 (bullseye)

Install method

Global npm / Node.js CLI install on Linux

Logs, screenshots, and evidence

- User-visible symptom: the final answer is already complete, but an older draft preview reappears afterward.
  - In Telegram DM, that stale preview is rendered by the client as a pinned-message-style banner at the top of the chat.
  - I have a screenshot showing the final answer already completed while the stale draft preview is shown again afterward.
  - Local investigation suggests this is an ordering/race issue: late partial or draft callbacks can still be applied after final delivery has already started.

Impact and severity

  • Affected users/systems/channels: Telegram direct-message users with streaming enabled, especially partial
  • Severity: Medium
  • Frequency: Intermittent but reproducible in real DM usage
  • Consequence: Confusing UX; it makes the bot look broken or as if it is sending stale content after completion

Additional information

This seems related to several existing Telegram streaming issues, but the bug here is narrower:

  • It is not only that Telegram draft streaming appears as a pinned banner.
  • It is that an older draft preview can still reappear after the final answer is already visible.

Possibly related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    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