[Bug] Text blocks between consecutive thinking blocks and tool calls silently dropped from TUI and session persistence
Bug Description
Title: Assistant text block preceding AskUserQuestion is silently dropped (not rendered, not persisted) when interleaved between thinking blocks
What happened: In a session using AskUserQuestion repeatedly, three turns generated a long explanation text block followed by an AskUserQuestion call. In all three, the text was
never rendered in the TUI and is absent from the session JSONL — the user saw only the question dialog ("I just see questions"). The model did generate the text: it survives in
the live conversation context (the assistant could later quote it verbatim, while thinking content from the same session comes back stripped, ruling out the text having been
thinking).
Pattern: Broken turns persist as thinking, thinking, tool_use(AskUserQuestion) — two consecutive thinking blocks, no text. A working turn in the same session persists as thinking,
text(2078 chars), tool_use(AskUserQuestion) and rendered fine. So the failure correlates with the text being interleaved between thinking blocks (thinking → text → thinking →
tool_use); text directly adjacent to the tool call renders correctly.
Not the trigger: dialog rejection. One broken turn's question was answered normally; the text was already missing.
Session 8994e457-995a-4e7d-a8d1-e69337426ef2, Claude Code 2.1.163, model claude-opus-4-8[1m]; broken turns at JSONL lines 123–125, 164–166,
172–174; working turn at 87–89 — extract attached.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.163
- Feedback ID: 9e0d84e1-ed5c-428f-8ae6-d09ac4fb66fa
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗