claude-code - 💡(How to fix) Fix [Bug] Text blocks between consecutive thinking blocks and tool calls silently dropped from TUI and session persistence

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

[]
RAW_BUFFERClick to expand / collapse

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

[]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING