mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
## Why An MCP server's environment permissions can change after a tool step captures its context. Guardian reviews of direct MCP calls could therefore miss denied paths present in the permissions used to prepare the call. ## What changed Pass the prepared server environment's sandbox context through MCP approvals and use it to build Guardian's permission evidence, including denied paths and globs resolved for that environment. Keep the sandbox context out of serialized approval actions. ## Testing Add a regression test that updates a remote MCP owner's permissions after the step starts and verifies that Guardian sees the owner's denied temporary directory. Extend the approval JSON test to verify that supplying sandbox context preserves the serialized action shape. GitOrigin-RevId: cab0d7c60112a97adf98e5548cdc066b260bb073