mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Refresh managed MCP requirements in place (#63348)
Update the retained configuration stack during session refresh. Copy only the MCP server, plugin, and feature requirements in both the parsed and TOML representations, avoiding a clone of the entire stack. GitOrigin-RevId: 1bae8cc86a59b4638f9f6cd48ee9eb17de31fef2
This commit is contained in:
@@ -166,9 +166,9 @@ impl Session {
|
||||
Constrained::allow_any(Default::default())
|
||||
};
|
||||
}
|
||||
config.config_layer_stack = config
|
||||
config
|
||||
.config_layer_stack
|
||||
.with_mcp_requirements_from(&next_config.config_layer_stack);
|
||||
.refresh_mcp_requirements(&next_config.config_layer_stack);
|
||||
if let Err(err) = config.features.refresh_mcp_features(&next_config.features) {
|
||||
warn!(%err, "failed to apply managed MCP feature restrictions");
|
||||
config.mcp_servers = Constrained::allow_any(Default::default());
|
||||
|
||||
Reference in New Issue
Block a user