Conversation
… live card code session/load rebuilt each tool card from the conversation summary: title the bare tool name, kind always "other", no locations, and rawOutput the model-facing result text instead of what the client was shown. Replay now reads each call's raw `tool` record and sends it through the same functions the live path uses (core-agent host/tool-display.ts: announcement, locations, settled outcome; and the ACP card code in rpc/updates.ts), so a refused, failed or located call shows the same card live and after a reload. view-model-parity.test.ts now compares the whole view model live and after session/load, less the reconstructed marker. It still fails on one field: the id of the user's own prompt block, which the client makes up live. Still breaks the rule that a reload shows only what was recorded: kind and locations are recomputed from the current tool definitions, and a call with no tool record is shown with a made-up id and status "failed". Next commits store those facts when they are shown, along with the thinking text the client saw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVjyjkaADPAqLvtnf3xUNs
Owner
Author
|
Early notes on the first commit, aimed at the unchecked items, since they are cheaper to settle before the next commits:
|
… was shown Each step's record carries what the client was shown of its stream (thinking text, and the answer text of a step that did not finish), and replay sends it. Not finished and not checked: kept so the approach is on record. The agent core is being rewritten, and this branch will not be merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVjyjkaADPAqLvtnf3xUNs
Owner
Author
|
Closing without merging: the agent core this changes is being rewritten. The branch keeps both commits, including the unfinished work on recording thinking, for reference. What this PR found still holds. These are requirements for the new core: a fact is recorded when it happens, never recomputed when the session is drawn again.
The ACP side of replay is set out in |
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
A session reopened with
session/loaddoes not show what the client was shown live (#543). Two causes:toolrecords), butreplay()inapp-acp/rpc/updates.tsrebuilt cards from the conversation summary (MessageView). It hardcoded kindother, used the bare tool name as the title with no locations, and sent the model-facing result text asrawOutput.Rule this PR works to: nothing shown live is lost, and nothing is recomputed or invented on reload.
Change (so far)
3fe2464Tool cards on reload are built from each call'stoolrecord, through the same functions the live path uses (core-agent/host/tool-display.tsfor the announcement, locations and settled outcome; the ACP card code inrpc/updates.ts). A refused, failed or located call now gives the same card live and after reload.view-model-parity.test.tscompares the whole view model live and after reload, less thelabkit.dev/reconstructedmarker, for a plain answer, a refused call, and a located call plus a failed call.Not done yet (this PR stays draft until they are)
model_settled, for every provider; replay it. Parity test with thinking from an Anthropic and an openai-chat provider.failedstatus for a call with no tool record.user:0); the three parity tests still fail on this one field only.Verification
bun run check: 1660 pass, 3 fail, the three parity tests above, each on the prompt block id only. Typecheck, format and lint pass.rawOutput.Linked: #543, #544, #576
🤖 Generated with Claude Code
https://claude.ai/code/session_01GVjyjkaADPAqLvtnf3xUNs