Repository navigation
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.
What type of PR is this?
fix
Check the PR title.
Description
ToolsNode currently aliases tool execution addresses and checkpoint result maps when a model emits empty or duplicate tool-call IDs. Assign deterministic batch-local keys to those calls, reserve the generated namespace against all model IDs, and use the same tool-name/key address for execution and legacy interrupt wrapping. Unique non-empty IDs retain their existing keys. Model-facing ToolCallID values and GetToolCallID remain unchanged.
Use the keys consistently in completed-result maps, rerun metadata and stream checkpoint bookkeeping. ToolCallKeys maps public interrupt metadata back to ToolCalls without requiring consumers to parse the key format.
Refs #1290. This keeps the batch-info accessor work in #1289 separate. It fixes legacy address inconsistency, but does not claim to fix the separate legacy UUID-based resume problem tracked by #1269.
Persisted checkpoint compatibility
New checkpoints carry a key-format version. Old ambiguous-ID checkpoints fail before dispatch because their completed-result maps may already have lost information; silently replaying those tools can repeat side effects. Old unique-ID modern checkpoints retain their address/key format. Legacy wrapper addresses change and old legacy interrupts are not transparently migrated. See docs/tool-call-checkpoint-identities.md for details and rollback limitations. Maintainer review of this compatibility policy is requested.
Validation
Implemented and tested with OpenAI Codex at the author's request. Independent human author review has not been completed; maintainer review is requested.