Skip to content

fix(chat): show Claude's between-step notes as Thought rows (port upstream #11784) - #259

Merged
TheDarkPhantom merged 2 commits into
mainfrom
fix/port-thinking-traces
Oct 1, 2026
Merged

TheDarkPhantom merged 2 commits into
mainfrom
fix/port-thinking-traces

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

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 thinking blocks rather than text blocks (see the Opus 5.5 migration guide, "Text between tool calls is returned in thinking blocks"). The Claude adapter emitted them as reasoning_text, and ingestion dropped every content delta except assistant_text. The session log for the reported thread has the comparison as a thinking block right before the AskUserQuestion.

Fix

This ports upstream pingdotgg#11784 ("show provider thinking traces", by @maria-rcks), cherry-picked with -x and adapted to the fork:

  • Contracts and server: a new reasoning message 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 get system rows instead (reasoningMessages).
  • Claude: requests summarized thinking display (showThinkingSummaries, thinking.display: "summarized"), maps thinking deltas to reasoning_summary_text, and backfills thinking from assistant snapshots. Subagent thinking stays out of the parent transcript.
  • Client: the thread snapshot cache is bumped to v4 so pre-thinking caches reload. The timeline shows a collapsed Thought row in the fork's row style. Thought rows fold with the turn's work once it settles, and a turn answered by thought alone keeps its row. Find opens a Thought row that holds a match.
  • Thread titles ignore reasoning.

Adaptations, because the fork predates some upstream systems:

Verification

  • Tests:
    • vp test run on ProviderRuntimeIngestion.test.ts and ClaudeAdapter.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.
    • The reasoning wire compatibility test in server.test.ts: passed.
    • parseChangelog.test.ts: passed.
  • Typecheck: tsgo is clean on server, web, client-runtime and contracts. Mobile shows only its existing navigation-type errors, none in touched code.
  • Desktop renderer pass on a dev server seeded with a VACUUM INTO copy of dev data, with a real Opus 5.5 turn (read two files, compare, ask a question):
    • Three Thought rows appeared in order between the tool calls, the last one directly above the question panel. It held the comparison the question referred to.
    • The rows survived a reload.
    • After answering, the turn folded under "Worked for 1m 32s". Expanding the fold showed the Thought rows again.

Follow-up noted in FUTURE_ENHANCEMENTS.md: open the latest note by default while a question is waiting.

🤖 Generated with Claude Code

maria-rcks and others added 2 commits October 2, 2026 01:51
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]>
@github-actions github-actions Bot added size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Oct 1, 2026
@TheDarkPhantom
TheDarkPhantom merged commit 1b61305 into main Oct 1, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the fix/port-thinking-traces branch October 1, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants