telegram: tool lines disappear from the live frame once the answer exceeds ~3900 runes #1651

Closed
opened 2026-10-27 13:41:15 +00:00 by sam · 0 comments
Owner

Mid-turn frames keep only the tail (clampToOneMessage keeps the last 3900 runes with a leading ellipsis). Tool lines are written inline near the start of the buffer — before the answer, since tools run before the answer in agentic turns — so once the answer exceeds ~3900 runes, every early tool line vanishes from the live frame (the buffer only grows; nothing re-inserts them mid-turn). They reappear at the top at finalize. The visible message changes shape three times (tool-inline, gone behind the ellipsis, tools-on-top) and the user watching mid-turn sees the tool activity silently disappear.

Failure: a turn with an early web_fetch followed by a 4000-rune answer shows only '...' + tail with no tool line for the bulk of the turn.

Design

Keep tool lines outside the clamped tail — render the tool block above the truncated answer tail in the live frame — so tool activity stays visible for the whole turn.

Acceptance criteria

In a turn with an early tool call and a >3900-rune answer, the live frame still shows the tool line(s) at the top rather than hiding them behind the ellipsis.

Close reason

Fixed in internal/channels/telegram/live.go: framedText keeps tool lines whole ahead of the clamped answer tail (fixes wpq6); finalText appends a '(no response)' marker when tools ran but the reply is empty (fixes hlxd); abandonFailed marks a provider-error partial distinctly from a clean /stop abandon (fixes c3w2). Regression tests verified red-then-green; adversarial review found no blocking issues (added one more test for the degenerate oversized-tool-block case it flagged). task check clean, committed as 587b9b9.


Imported from beads archie-core-wpq6 · GitHub #490 · type bug · priority P2 · created 2026-08-14 · closed 2026-08-14

Mid-turn frames keep only the tail (clampToOneMessage keeps the last 3900 runes with a leading ellipsis). Tool lines are written inline near the start of the buffer — before the answer, since tools run before the answer in agentic turns — so once the answer exceeds ~3900 runes, every early tool line vanishes from the live frame (the buffer only grows; nothing re-inserts them mid-turn). They reappear at the top at finalize. The visible message changes shape three times (tool-inline, gone behind the ellipsis, tools-on-top) and the user watching mid-turn sees the tool activity silently disappear. Failure: a turn with an early web_fetch followed by a 4000-rune answer shows only '...' + tail with no tool line for the bulk of the turn. ### Design Keep tool lines outside the clamped tail — render the tool block above the truncated answer tail in the live frame — so tool activity stays visible for the whole turn. ### Acceptance criteria In a turn with an early tool call and a >3900-rune answer, the live frame still shows the tool line(s) at the top rather than hiding them behind the ellipsis. ### Close reason Fixed in internal/channels/telegram/live.go: framedText keeps tool lines whole ahead of the clamped answer tail (fixes wpq6); finalText appends a '(no response)' marker when tools ran but the reply is empty (fixes hlxd); abandonFailed marks a provider-error partial distinctly from a clean /stop abandon (fixes c3w2). Regression tests verified red-then-green; adversarial review found no blocking issues (added one more test for the degenerate oversized-tool-block case it flagged). task check clean, committed as 587b9b9. --- _Imported from beads `archie-core-wpq6` · GitHub #490 · type bug · priority P2 · created 2026-08-14 · closed 2026-08-14_
sam added the mediumbug labels 2026-10-27 13:41:15 +00:00
sam self-assigned this 2026-10-27 13:41:15 +00:00
sam closed this issue 2026-10-27 13:41:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1651