Skip to content

[Bug]: Telegram DM fabricates silent-reply chatter for no-visible-response turns #70628

Description

@mewincaka

Summary

Telegram direct-message turns that end with no visible final reply can still emit a synthetic user-facing bubble like "No added response from me." instead of staying silent.

Reproduction shape

This reproduces when:

  • surface = telegram
  • conversation type = direct / DM
  • the turn ends without a visible final reply
  • there is no dispatch error and no non-silent delivery failure

A real incident produced repeated Telegram DM bubbles such as:

  • No added response from me.
  • followed later by a recovered background-task completion message

Root cause

There are two pieces that combine into the leak:

  1. extensions/telegram/src/bot-message-dispatch.ts

    • in the !queuedFinal && !sentFallback && !dispatchError && !deliverySummary.delivered path
    • the adapter synthesizes [{ text: "NO_REPLY" }]
    • then immediately routes it through outbound delivery
  2. src/infra/outbound/payloads.ts + silent-reply policy defaults

    • direct conversations default to silentReply.direct = "disallow"
    • direct conversations default to silentReplyRewrite.direct = true
    • so the synthetic NO_REPLY is rewritten into visible filler text like No added response from me.

That means an intentionally silent Telegram DM turn is converted into misleading chatter.

Why this is a bug

The adapter already has a separate fallback path for actual failures:

  • dispatch error
  • or non-silent delivery failure / skip

This no-visible-response path is different: it can represent an intentionally silent turn. In that case the Telegram adapter should not fabricate a user-visible message.

Expected behavior

For Telegram DMs:

  • if a turn ends with no visible final reply and no actual error,
  • keep the turn truly silent
  • do not synthesize a NO_REPLY fallback bubble
  • status reaction state should complete as a normal handled turn, not as an error

Additional note

The current test suite explicitly encodes the buggy behavior in extensions/telegram/src/bot-message-dispatch.test.ts by expecting a DM no-visible-response turn to be rewritten through silent-reply fallback.

Proposed fix

In extensions/telegram/src/bot-message-dispatch.ts:

  • suppress synthetic silent-reply fallback for Telegram direct turns
  • treat the silent turn as handled
  • keep group behavior unchanged unless the projected fallback is already empty

I have a PR ready with:

  • source fix in extensions/telegram/src/bot-message-dispatch.ts
  • regression test update in extensions/telegram/src/bot-message-dispatch.test.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.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