-
-
Notifications
You must be signed in to change notification settings - Fork 80.3k
issue(telegram): preview streaming can suppress drafts that Web already shows #95004
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
No fields configured for issues without a type.
Summary
Telegram preview streaming can suppress intermediate drafts even when the Web UI has corresponding draft/progress state. Users then see no Telegram draft for a long time, or only the final fixed message, which makes Telegram feel unreliable compared with Web.
This appears to come from multiple Telegram-specific gates in the draft stream path:
minInitialChars = 30, so short first previews are intentionally not materialized;messageId()/sendMayHaveLanded()), so fast completions or delayed sends can skip visible drafts.Source-level reproduction
1. First Telegram draft below 30 chars is suppressed
Existing tests in
extensions/telegram/src/draft-stream.test.tsassert this behavior:This means a Telegram draft can be absent even though upstream streaming has already produced visible draft text.
2. Telegram dispatch config applies the threshold to non-progress modes
extensions/telegram/src/bot-message-dispatch.ts:The default/partial path therefore debounces the first native Telegram draft until it has at least 30 characters.
3. Progress mode intentionally suppresses answer-lane draft text
extensions/telegram/src/bot-message-dispatch.tssuppresses answer-lane partial updates in progress mode:In progress mode, Telegram can show only tool/progress rows; if there are no progress rows or they are hidden/suppressed, Telegram shows no draft even though the assistant is streaming.
Actual behavior
Expected behavior
Telegram should provide a predictable lightweight progress indication whenever upstream streaming/draft state exists, without creating noisy duplicate messages.
Possible acceptable outcomes:
minInitialCharswhen the turn has already been active for a configured delay;Impact
Verification target
A fix should add/adjust Telegram tests that cover at least one of:
The test should prove Telegram provides a predictable visible draft/placeholder when upstream draft/progress state exists, while still avoiding duplicate preview spam.