[mcp] Fix plugin MCP approval policy.#19537
Merged
mzeng-openai merged 14 commits intomainfrom Apr 29, 2026
Merged
Conversation
…mcp-policy # Conflicts: # codex-rs/core/src/plugins/manager_tests.rs
mzeng-openai
commented
Apr 27, 2026
| } | ||
|
|
||
| if !force_reload && let Some(outcome) = self.cached_enabled_outcome() { | ||
| let config_version = version_for_toml(&config.config_layer_stack.effective_config()); |
Collaborator
Author
There was a problem hiding this comment.
Invalidate plugin cache when the actual config changes.
This was referenced Apr 28, 2026
shijie-oai
reviewed
Apr 28, 2026
shijie-oai
reviewed
Apr 28, 2026
xl-openai
approved these changes
Apr 29, 2026
owenlin0
approved these changes
Apr 29, 2026
shijie-oai
approved these changes
Apr 29, 2026
…mcp-policy # Conflicts: # codex-rs/core/src/plugins/manager.rs # codex-rs/core/src/plugins/manager_tests.rs
… into dev/mzeng/plugin-mcp-policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin MCP servers are loaded from plugin manifests rather than top-level
[mcp_servers], so their tool approval preferences need to be stored and applied through the owning plugin config. Without this, choosing "Always allow" for a plugin MCP tool could write a preference that was not reliably used on later tool calls.Summary
plugins.<plugin>.mcp_servers, including server enablement, tool allow/deny lists, server defaults, and per-tool approval modes.plugins.<plugin>.mcp_servers.<server>.tools.<tool>config entry.config.tomlchanges.Testing
cargo test -p codex-configcargo test -p codex-core-pluginscargo test -p codex-core --lib plugin_mcp