Skip to content

Fix MCP permission policy sync#19033

Merged
leoshimo-oai merged 1 commit intomainfrom
leoshimo/mcp-permission-policy-sync
Apr 22, 2026
Merged

Fix MCP permission policy sync#19033
leoshimo-oai merged 1 commit intomainfrom
leoshimo/mcp-permission-policy-sync

Conversation

@leoshimo-oai
Copy link
Copy Markdown
Contributor

@leoshimo-oai leoshimo-oai commented Apr 22, 2026

Why/Context/Summary

Repro: start a session outside Full Access, switch permissions to Full Access, then submit a new turn that triggers MCP/CUA permission handling.

The turn used the live Full Access SessionConfiguration, but the MCP coordinator was still synced from the stale original_config_do_not_use / per-turn config copy. That left the coordinator with an old sandbox policy, so empty MCP permission elicitations could be denied instead of auto-accepted.

Fix: update/rebuild the MCP connection manager from the live turn/session approval and sandbox policy fields.

Test plan
just fmt
cargo test -p codex-core --lib
cargo test -p codex-core --lib mcp_tool_call::tests

@leoshimo-oai leoshimo-oai requested a review from a team as a code owner April 22, 2026 20:47
@leoshimo-oai leoshimo-oai enabled auto-merge (squash) April 22, 2026 21:23
@leoshimo-oai leoshimo-oai merged commit 16eeeb5 into main Apr 22, 2026
35 of 36 checks passed
@leoshimo-oai leoshimo-oai deleted the leoshimo/mcp-permission-policy-sync branch April 22, 2026 21:30
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants