Files
codex/codex-rs
Charlie Marsh 2744e8686c Share prepared MCP tool definitions across sessions (#55724)
## Why

Sessions using the same MCP catalog can repeat schema normalization and retain duplicate tool specifications.

## What changed

Split immutable MCP tool metadata and normalized specifications from per-handler caches, and reuse matching definitions within each `McpManager`. Require matching tool metadata, agent-plugin mode, and schema budget before reuse.

Keep shared definitions behind weak references and prune expired entries on cache misses so completed sessions do not keep their schemas alive. Build definitions outside the shared index lock.

GitOrigin-RevId: 02345359a1b0d297ca56f2f469de88aba89106f1
2026-10-21 01:55:56 +00:00
..
…
…