{{ message }}
Repository navigation
refactor(schema): coalesce tool replay data into native - #57286
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.

Change
Correction for the v2.1 integration in #57260: store all tool provider replay data in one
tool.native, rather than keeping result data intool.state.native.native; projection now merges it into the existing tool-levelnativein core, the client, TUI and CLI.providerResultStatemerges intonativeat the existing legacy read boundary. No database migration or alias for the unreleasedstate.nativeshape.Why one field
This avoids a second
nativeat another nesting level, a one-offresultNativename, or a tool-specific{ call, result }envelope. Protocol implementations must keep different call/result values under different keys; this constraint is documented onNative. Current Anthropic hosted calls carry no replay data, while Responses hosted calls and results carry the sameitemId, so neither loses data in the merge.Scope
Targets
v2.1, notdev. Merge this first to update #57260. Event schemas, compaction,keepID, credential behavior and the hosted-tool fallback PR are untouched.Verification
bun run checkpasses; changed-file lint passes.check:generatedscripts pass.Live Anthropic verification
Tested this branch end-to-end through the standalone CLI with server-side
web_searchandweb_fetch. Both completed, and sessions continued successfully after restarting the CLI. Also tested a failedweb_fetchand continued that session successfully.Inspected the isolated stored sessions and captured next-request bodies: replay data exists only on
tool.native(notstate.native), and success/error result blocks are replayed unchanged, including encrypted search content. Follow-up messages made no new tool calls.