Repository navigation
Bind MCP calls to captured catalog revisions - #34588
Merged
copyberry[bot] merged 1 commit intoJul 21, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why An MCP connection or tool catalog can change after a model step captures its available tools. Calls from that step must not be rerouted to a replacement client or run against a catalog revision the model did not see. ## What changed - Add `McpBinding` to capture the ready clients, visible tools, resources, and server metadata for one sampling request. - Prepare calls against the captured client and reject them if the tool catalog changes before call preparation and execution finish. - Keep resource access and cache identity tied to the binding's exact connection set, and omit servers that do not have a ready client. - Preserve each client's unfiltered tool catalog so bindings can apply the current filter consistently. ## Testing Add coverage for connection replacement, stale catalog rejection, serialized call preparation and refresh, ready-client capture, and binding-scoped resource identity. GitOrigin-RevId: a25da4d2c7f5ed06c41caa0c6d15c464c1698314
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/a25da4d2c7f5ed06c41caa0c6d15c464c1698314
branch
from
July 21, 2026 18:14
d6a15fc to
65f8bf6
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/a25da4d2c7f5ed06c41caa0c6d15c464c1698314
branch
July 21, 2026 18:16
protpersonal
temporarily deployed
to
issue-triage
July 21, 2026 18:16 — with
GitHub Actions
Inactive
protpersonal
temporarily deployed
to
issue-triage
July 21, 2026 18:16 — with
GitHub Actions
Inactive
protpersonal
temporarily deployed
to
issue-triage
July 21, 2026 18:16 — with
GitHub Actions
Inactive
This branch was previously 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Bind MCP calls to captured catalog revisions
Why
An MCP connection or tool catalog can change after a model step captures its
available tools. Calls from that step must not be rerouted to a replacement
client or run against a catalog revision the model did not see.
What changed
McpBindingto capture the ready clients, visible tools, resources, andserver metadata for one sampling request.
changes before call preparation and execution finish.
set, and omit servers that do not have a ready client.
current filter consistently.
Testing
Add coverage for connection replacement, stale catalog rejection, serialized
call preparation and refresh, ready-client capture, and binding-scoped resource
identity.