Skip to content

Bind MCP calls to captured catalog revisions - #34588

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a25da4d2c7f5ed06c41caa0c6d15c464c1698314
Jul 21, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a25da4d2c7f5ed06c41caa0c6d15c464c1698314

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

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

  • 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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a25da4d2c7f5ed06c41caa0c6d15c464c1698314 branch from d6a15fc to 65f8bf6 Compare July 21, 2026 18:14
@copyberry
copyberry Bot merged commit 65f8bf6 into main Jul 21, 2026
31 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a25da4d2c7f5ed06c41caa0c6d15c464c1698314 branch July 21, 2026 18:16
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 65f8bf68 Deployed Jul 21, 2026 by protpersonal via Generate label suggestions #33216
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants