Repository navigation
Conversation
This was referenced Nov 19, 2026
xeophon
marked this pull request as ready for review
November 19, 2026 01:13
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cdf4ed1. Configure here.
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Intercepted tool results now stay associated with their issuing sampled turn across replays and tool-catalog changes. Ambiguous associations fail explicitly, while existing tool-gate enforcement remains in place. You can add or adjust custom eligibility rules. Learn more. |
xeophon
force-pushed
the
codex/3205-tool-issuers
branch
from
November 19, 2026 01:30
cdf4ed1 to
23e57cb
Compare
This branch has not been deployed
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.

Associate intercepted tool results with their sampled assistant node and call ID. A gate with known ancestry uses that branch directly. A wire receipt can use its replayed history to identify a unique issuer. If two samples share that history and ID, the server reports ambiguity, even when the follow-up advertises a different tool catalog. An unrecognized call outside the sampled graph keeps its conversation-prefix key. The regression covers switching to a sibling’s catalog, switching to an unknown catalog, and resolving the same receipt with known ancestry.
Local unit suite on this commit reported 299 passed, 19 skipped. Full-stack CI before review fixes
Layer 2 of 13. Builds on #3208. Stack index
Note
Key tool results to issuing turn in
RolloutSessionreplay handlingHarnessErrorwhen multiple issuers match.gate_tool_calls,decide_tool,pin_tool_results, andrewrite_requestall pass the branch's physical ancestry, root node's tool catalog, and per-node wire dialect into request rewriting and key derivation.graph.replay_message_hashand extractsgraph.path_node_idsin graph.py; the returned message sequence is unchanged.InterceptionServermodel-response handler now passes the active dialect name togate_tool_calls.HarnessErrorinstead of silently attaching to an arbitrary turn.Macroscope summarized 23e57cb.
Note
Medium Risk
Changes tool-result identity and request rewriting on every intercepted turn; mis-keying would corrupt transcripts, though ambiguity now fails fast and a regression test covers the branching cases.
Overview
Reworks how intercepted tool results are keyed and replayed so each call keeps the rewrite from the sampled assistant node that issued it, not a shared conversation-prefix hash.
RolloutSessionnow keystool_decisions,pinned_tool_results, andgated_toolsby(issuing node id, call id)(with prefix-based aliases for harness-only calls).tool_result_keys,pin_tool_results, andrewrite_requesttakedialectand an optionalknown_pathso message matching usesreplay_message_hashand sampled nodes populatetool_issuers. When the same replayed call ID could map to more than one issuer, the session raisesHarnessError: Ambiguous issuing turninstead of picking one silently.gate_tool_callsrecords per-node dialect, builds probes frompath_node_idsand the root node's tool catalog, and passes dialect/path into rewrites;decide_toolaligns with node-scoped keys.graphexposesreplay_message_hash(renamed from private_message_key) andpath_node_ids;pathis implemented via node ids. The interception server passesdialect.nameintogate_tool_calls.Adds
test_each_sample_keeps_its_tool_result_across_assistant_replayscovering sibling samples that reuse a call ID, catalog changes, follow-up gating, ambiguity errors, and explicitknown_pathpinning.Reviewed by Cursor Bugbot for commit 23e57cb. Bugbot is set up for automated code reviews on this repo. Configure here.