Repository navigation
Claude: narration between tool calls renders as a summarized message, not reasoning - #1013
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With thinking on, Claude Code 2.1.312 + Opus 5.5 do not deliver the prose the model writes to the user between tool calls as
text. The server replaces it with its own summary, sent as athinkingblock. Only the frame'snarration_block_indexestells this block apart from reasoning. Claude Code's terminal UI shows it as a message marked "· summarized". Tcode mapped it toReasoning, so it was folded into the work log. A reply to a mid-turn steer therefore looked as if the steer had been ignored. In one local database, 335 of 2555 first replies after a steer (13%) ended up folded this way.The streamed placeholder (
Reasoning, samemsg:indexid) is replaced in place by the completed message, so the text renders once, as a message.ItemContent::AssistantMessage { text, + summarized: bool, // serde default false, omitted when false } <AssistantMessage> markdown + "Summarized" / "已概括" caption (muted, xs) when summarizedsummarizedis a field onAssistantMessage, not a new variant. Narration is still the assistant talking to the user, so every existing reader of assistant text keeps it: relay, search, export, titles, the latest-message action row. Before the server began summarizing, that same interim prose arrived as plain text and those readers already included it.Not covered: Claude transcript import and subagent transcript tails. Their JSONL has no
narration_block_indexes. Telling narration apart there would mean decoding the signature envelope, which the CLI does internally and does not expose. Event logs written before this change keep theirReasoningentries.Evidence
{"kind":"reasoning","text":"…"}. The CLI's own transcript has the same block astype: "thinking", and its signature tags itblock_kindnarration. A live CLI run shows the frame field:assistant [('thinking', "f.txt contains two lines…")] {'narration_block_indexes': [0], 'thinking_display': 'updates'}narration_completes_its_streamed_block_as_a_summarized_messagereplays those recorded frames. The completion isAssistantMessage { summarized: true }under the streamed idmsg_n:1. The test fails with the narration branch disabled and passes with it.assistant_messages_are_summarized_only_when_recordedchecks the wire literals. A legacy record with no field decodes tofalse, and"summarized":trueis written only when set.cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo nextest run --workspace(1359 passed) were run on macOS. The iOS, Android and Web checks are left to CI.Merge Danger
Door: two-way
The new field is additive and optional on the wire. Older logs and peers decode it as
false; an older client ignores it and shows the narration as a plain message. Noted as Unreleased abovePROTOCOL_VERSION.Blast Radius: Claude timelines
Mid-turn narration moves out of the collapsed work log into the timeline as messages, so Claude turns with thinking on show more prose between activity runs.