[Bug] Assistant text dropped from transcript when thinking blocks precede tool calls
Bug Description
Title: Assistant text before tool calls is dropped entirely (not just hidden) when thinking blocks intervene — missing from the transcript JSONL
Version/setup: Claude Code 2.1.222, model claude-fable-5, interleaved thinking (effort high), Linux.
Expected: Assistant text emitted in the same message as tool calls may not render in the terminal UI (known limitation), but should at least be recoverable from the session transcript (ctrl+o / the ~/.claude/projects/<project>/<session>.jsonl file).
Actual: When the response shape is text → thinking → tool_use (interleaved thinking resumed after the text), the text block is never written to the transcript JSONL at all. The entries sharing that message.id contain only thinking and tool_use blocks. Grepping the JSONL for distinctive phrases from six such messages in one session gives zero hits — the content is unrecoverable at every layer (UI, verbose, transcript view, file on disk). When the tool_use directly follows the text with no intervening thinking block, the text IS written (though still not rendered in the UI).
Impact: Silent, permanent loss of user-facing assistant output; also blinds transcript-based tooling (e.g. PreToolUse hooks that inspect the current message).
Repro: Any turn where the model emits prose, thinks again, then calls a tool; grep the session JSONL for the prose afterwards.
Environment Info
- Platform: linux
- Terminal: xterm
- Version: 2.1.222
- Feedback ID: 24978dfc-21b3-4e1f-86a1-2d45177a4c89
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗