[Bug] Text block silently dropped from render and transcript after no-comment AskUserQuestion answer
Bug Description
Text block silently dropped from render AND transcript when turn follows a no-comment AskUserQuestion answer and ends in another tool_use
Environment:
- Claude Code v2.1.172 (native install), macOS (Darwin 25.3.0), running inside tmux (also reproduced on 2.1.170)
- Model: claude-fable-5[1m]
Summary:
When an assistant turn (a) begins from a bare tool_result — specifically an AskUserQuestion answered by selecting an option with no typed comment — and (b) ends in another tool_use (AskUserQuestion), any text block the model emits in that turn is lost twice: it is never painted to the terminal, and it is not persisted to the session transcript JSONL. The text block does survive in the in-memory API conversation history (the model can still quote it on later turns, and resending always works).
Reproduction (100% in our testing):
- Have the assistant call AskUserQuestion. Answer it by selecting an option only — type no comment.
- In the next turn, have the assistant emit several lines of visible text followed by another AskUserQuestion in the same turn.
- Observe: only the question dialog appears; the text is invisible. The transcript JSONL records the turn as thinking, thinking, tool_use with no text block.
Evidence:
- Controlled test: assistant emitted 5 numbered "TEST LINE" lines + dialog after a no-comment answer → user saw none; transcript shows think | think | AskUserQuestion, no text block; request usage was 457 output tokens (consistent with the text having been generated). On the following turn the model still quoted the test lines verbatim from its context, proving the API delivered them.
- Control case in the same session: identical text+dialog turn, but preceded by a typed user message → rendered fine and persisted as think | text(1170) | AskUserQuestion.
- Across two sessions, the discriminator held 13/13: previous user message contains typed text → text renders and persists; previous message is a tool_result only → text swallowed. One affected turn lost ~8k output tokens of content (a full design presentation).
- Debug log shows a full-viewport repaint at the dialog transition in affected turns: High write ratio: blit=0, write=4039 (100.0% writes) — healthy turns show incremental blits.
- Affected turns persist with two thinking blocks (content stripped, signatures retained, e.g. 404 B and 816 B) where healthy turns have one.
Expected: Text emitted before a tool_use renders in the terminal and is persisted to the transcript, regardless of whether the turn began from a tool_result.
Actual: Text is dropped from both the display and the JSONL; only the dialog renders. Because the transcript is also wrong, post-hoc debugging is misleading — the turn looks as if the model never generated text.
Impact: Users approve/deny AskUserQuestion dialogs without seeing the content they're deciding on; transcript-based tooling and session resume lose the content too.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.172
- Feedback ID: 22e407c7-a345-43ac-8500-6e8cc7d5e487
Errors
[]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗