mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
## Why An MCP server can belong to a different environment from the turn's primary environment. An early Guardian score based on the issuing context must not bypass review when the server owner's permissions differ. ## What changed - Capture the owning environment's permissions when preparing an MCP call and retain them for server-initiated approvals tied to that still-running call. - Use the captured permissions consistently in Guardian review prompts and permission context. - Require a fresh synchronous review when the captured owner permissions do not match the early score's authorization. ## Testing Extend regression coverage for MCP score reuse across environments and for follow-up approvals from a local MCP server during a remote-primary turn. Assert that reviews use the owner's denied paths and require a fresh review when permissions differ. GitOrigin-RevId: eb5eeb1259732c57f39765c38e34148fa0787dae