mirror of
https://github.com/openai/codex.git
synced 2026-11-11 06:31:37 +00:00
Use ReviewDecision for MCP tool approvals (#38081)
## What changed - Add `ApprovedMcpPolicyAmendment` to represent MCP approvals that persist across sessions. - Route MCP approval responses directly through the shared `ReviewDecision` type while preserving session-only approvals, rejection reasons, timeouts, and cancellations. - Reject the MCP-only policy decision if it reaches command, shell, network, or other tool approval paths. ## Testing - Update MCP approval parsing, normalization, hook, and Guardian tests for the shared decisions. - Verify generic tool approvals reject MCP policy amendments. GitOrigin-RevId: b8cc931dc61d4c794915145273ede82b9eb30fc8
This commit is contained in:
1 parent
7c47952f7c
commit
67afc79674
17 files changed
+154
-120
No files matched your search
+7
@@ -4258,6 +4258,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "User has approved this MCP tool call and wants to amend its policy so matching future calls are automatically approved across sessions.",
|
||||
"enum": [
|
||||
"approved_mcp_policy_amendment"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
|
||||
|
||||
Reference in new issue
Block a user