Files
codex/codex-rs/codex-mcp
Charlie Marsh f8bed26f7b Share Apps tool catalogs without retaining unused snapshots (#45440)
## Why

Idle Apps clients and cached MCP bindings can retain replaced tool definitions. Shared catalog updates can also invalidate prepared calls even when the current definitions match the captured catalog, including after tools are restored while a call awaits approval.

## What changed

- Share immutable tool arrays across equivalent live discovery contexts and reuse storage for equal results. Let unused providers and cached bindings expire.
- Include requested capabilities and initialization results in the sharing scope, and detach servers that disable catalog caching from live sharing.
- Capture catalog snapshots for prepared calls. Accept equivalent shared catalogs regardless of tool-list order, while rejecting changed definitions and calls captured before an explicit refresh on that client.

## Testing

Add regression coverage for shared storage and scope isolation, release of replaced tools and unused bindings, equivalent catalog restoration, explicit refresh invalidation, and an Apps call completing after catalog restoration while awaiting approval.

GitOrigin-RevId: a0516186e4286d0ff13405fafbab6fcf3f1f3773
2026-09-14 15:06:28 +00:00
..