Support Always Allow for MCP app messages#21231
Conversation
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/config/edit.rs
Lines 348 to 354 in 9f74246
ConfigEdit::ReplaceMcpServers drops the new per-tool message-approval setting. serialize_mcp_server_tool only emits approval_mode, so rewrites of [mcp_servers] strip mcp_app_message_approval_mode from config.toml. This loses persisted “Always allow” message approvals after subsequent config edits/reloads.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Seems legit @leoshimo-oai |
2bf9a37 to
3952b10
Compare
3952b10 to
f8502a4
Compare
|
@mzeng - updated. I also added lmkwyt |
f8502a4 to
d943eb4
Compare
d943eb4 to
dd6239a
Compare
| } | ||
| } | ||
| } | ||
| if effective_servers.contains_key(CODEX_APPS_MCP_SERVER_NAME) { |
There was a problem hiding this comment.
This tech debt is on me, but we really shouldn't be doing hardcoded server name check anymore, I'm getting #20649 in to stop this so hopefully you can rebase and remove this check.
There was a problem hiding this comment.
that's great - lmk once it's in 👍
There was a problem hiding this comment.
Noticed McpServerProvenance in the other PR, which reminds me of McpServerProvider. Maybe some dots to connected there.
Adds config support for “Always allow” on MCP App follow-up messages, scoped to the tool that produced the MCP App interface.
This is modeled after the existing
approval_modeflag for "Always Allow" tool calls. It also exposes MCP server provider metadata over app-server status so clients can distinguish Codex Apps, standalone MCP servers, and plugin-owned MCP servers when writing approval config.mcp_app_message_approval_mode = "auto"keeps the default approval prompt behavior."approve_in_thread"skips the follow-up approval speed bump when the MCP app sends a message to the current thread.Config examples
Testing
Validated against the Codex app branch in openai/openai#890933 using local standalone and plugin MCP servers.