mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
## Why Starting a turn discarded the discovery cache and forced MCP to rebuild from a fresh inventory even when the executor context was unchanged. An MCP refresh could also discover a different inventory from the one the step had already captured. ## What changed Keep a per-thread cache keyed by environment, executor session, working directory, and sandbox. Explicit invalidation reloads discovery on the next lookup and lets in-flight readers finish with their captured results. Use the step's captured inventory for MCP reconciliation and bind it with the current MCP policy. Apply the binding's plugin policy when selecting skills and hooks. ## Testing Cover cache reuse across turns, lazy invalidation during in-flight discovery, and MCP refresh with a captured inventory after a server has been revoked. GitOrigin-RevId: 8d4087dffdb3d6feef2456918a08ae7724cf18e4