Repository navigation
fix(chat): show Claude's between-step notes as Thought rows (port upstream #11784) - #259
Merged
Merged
Conversation
Port of upstream pingdotgg#11784 onto the fork. Opus 5.5 sends the notes it writes between tool calls as thinking blocks, which the server dropped, so questions referred to explanations the user never saw. Adapted to the fork (which predates upstream's thread pagination, response streaming modes, ACP thought events and subagent stream routing): - reasoning is always buffered and flushed when its block closes - the reasoningMessages opt-in rides on the existing thread reads only - Cursor and Grok are unchanged (the fork's ACP runtime has no thought events) - subagent thinking is kept out of the parent transcript - thread snapshot cache bumps to v4 so pre-thinking caches reload - the timeline gets a collapsed Thought row in the fork's own row style Co-authored-by: maria-rcks <[email protected]> (cherry picked from commit 052c7ae) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Opus 5.5 sends the notes it writes between tool calls as thinking blocks, so a question like "Given the comparison..." pointed at text the user never saw. With the thinking traces port these now land as Thought rows. Find opens a Thought row that holds a match, the same way it opens tool output. Changelog and enhancement notes record what was not ported. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Problem
On Opus 5.5, Claude asked questions like "Given the comparison, how do you want to handle developer@?" without the comparison anywhere on screen. Opus 5.5 sends the notes it writes between tool calls as
thinkingblocks rather thantextblocks (see the Opus 5.5 migration guide, "Text between tool calls is returned in thinking blocks"). The Claude adapter emitted them asreasoning_text, and ingestion dropped every content delta exceptassistant_text. The session log for the reported thread has the comparison as a thinking block right before theAskUserQuestion.Fix
This ports upstream pingdotgg#11784 ("show provider thinking traces", by @maria-rcks), cherry-picked with
-xand adapted to the fork:reasoningmessage role and reasoning delta/complete commands. Ingestion turns reasoning deltas into reasoning messages and closes each block on tool start, visible text, assistant completion, item completion, and a pause for a question. Older clients that don't opt in getsystemrows instead (reasoningMessages).showThinkingSummaries,thinking.display: "summarized"), maps thinking deltas toreasoning_summary_text, and backfills thinking from assistant snapshots. Subagent thinking stays out of the parent transcript.Adaptations, because the fork predates some upstream systems:
reasoningMessagesopt-in rides on the existing thread reads. The fork has no pagination.Verification
vp test runonProviderRuntimeIngestion.test.tsandClaudeAdapter.test.ts: 143 passed. This includes a new test, "finalizes a Claude progress note when the turn pauses for a question".MessagesTimeline.logic.test.ts: 46 passed.server.test.ts: passed.parseChangelog.test.ts: passed.tsgois clean on server, web, client-runtime and contracts. Mobile shows only its existing navigation-type errors, none in touched code.VACUUM INTOcopy of dev data, with a real Opus 5.5 turn (read two files, compare, ask a question):Follow-up noted in
FUTURE_ENHANCEMENTS.md: open the latest note by default while a question is waiting.🤖 Generated with Claude Code