Mid-turn assistant text lost with interleaved-thinking models: destroyed on 2.1.202; persists but never renders on 2.1.203+ (default and transcript views)
Bug report draft: mid-turn assistant text blocks lost/unrendered with interleaved thinking models
Summary
With a model that emits interleaved extended thinking (assistant turn = repeated segments of[thinking → text → tool_use]), assistant text blocks in continuation segments (any text that is
not the turn's first or final text block) are lost to the user:
- CLI 2.1.202: the text blocks were destroyed — never written to the session transcript
(~/.claude/projects/<proj>/<session>.jsonl) and never rendered in the TUI.
- CLI 2.1.203: the same text blocks now persist to the transcript as
['text']records
(improvement), but the live TUI still does not render them. Confirmed visually by the user
watching the terminal while two labeled probe messages were emitted between Bash tool calls.
- Changelog for 2.1.203–2.1.205 documents no related fix (2.1.203's "message loss at --max-turns"
is a different path).
Models that do NOT interleave thinking per-segment (e.g., Opus 4.8 emitting [text → tool_use]
segments) render every mid-turn text block correctly in the same terminal/session.
Environment
- Claude Code 2.1.202 → 2.1.203 (restarted; PATH binary meanwhile 2.1.206), Linux WSL2,
tui: "default". - Model: claude-fable-5, effort max (interleaved thinking on every segment).
- Long multi-tool turns (10–40 tool calls), interactive terminal session.
Repro
- Run a session with an interleaved-thinking model (fable/max effort) in the default TUI.
- Prompt for a multi-step tool task; have the model emit a distinctive text line BETWEEN two tool
calls (not turn-initial, not turn-final), e.g. "PROBE-D".
- Observe: probe not rendered in the TUI (user side).
- Check the session
.jsonl:
- 2.1.202: no record containing the probe text exists at all (block destroyed).
- 2.1.203: an assistant record with
content: [{"type":"text","text":"...PROBE-D..."}]exists —
persisted but never rendered.
Forensic survivorship table (from a real session .jsonl)
Per-turn pattern with claude-fable-5 on 2.1.202:
- Turn-initial text: persisted + rendered.
- Turn-final text (no trailing tool_use): persisted + rendered.
- Every text block between them (segments
[thinking, text, tool_use]): ABSENT from the jsonl. - Rare mid-turn segment without thinking (
[text, tool_use]): persisted + rendered (observed once) —
pointing at text-after-thinking-within-continuation-segment as the trigger.
Same session, claude-opus-4-8 turns: every text block persisted + rendered.
Expected
All assistant text blocks render to the user (and persist), regardless of position in the turn or
adjacency to thinking blocks.
Impact
With thinking-heavy models the assistant cannot communicate progress mid-turn at all: updates are
silently lost (2.1.202: unrecoverable; 2.1.203: recoverable only by reading the raw jsonl). Users
see "zero responses" during long agentic turns.
Update (same day): 2.1.203 render test + view coverage
- Restarted into 2.1.203: probe texts now PERSIST to the session .jsonl as
['text']records, but
are still NOT rendered — neither in the default view nor in the transcript view toggle (user
checked Ctrl+O: absent). So the persistence layer was fixed between 2.1.202 and 2.1.203, the
render layer was not.
- Empirical render rule observed across many turns: the FIRST text block after each conversation
boundary (user message / injected notification) renders; every subsequent text block before the
next boundary is hidden. Segments without a preceding thinking block occasionally render (observed
once), consistent with text-after-thinking-in-continuation-segments being the trigger.
Related prior reports (all closed "not planned")
- #24691 (streaming text disappears when followed by tool calls)
- #57819 (non-streaming fallback drops thinking/text preamble; 1-record-vs-blocks root cause)
- #30762 (TUI groups thinking/tools by type, not chronological)
- #21751 (assistant text not written to transcript — the persistence half, now fixed)
- #51070 (text-only mid-task messages end turn)
This report adds: the persistence/render split with a clean version bisection (2.1.202 destroys;
2.1.203 persists+hides), the boundary-rule reproduction, and a model where EVERY continuation
segment interleaves thinking (claude-fable-5 at max effort) making the loss total rather than
occasional.