mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
Keep Guardian reviews isolated from executor MCP servers (#39962)
## Why Executor-owned MCP configuration can include required servers that are unavailable. Guardian review sessions should not attempt to discover those servers or let them block an approval review. ## What changed - Skip projecting MCP servers from selected executors when the session source is a Guardian reviewer. - Preserve executor MCP discovery for regular thread sessions. ## Testing Added an app-server integration test that configures an unreachable required executor MCP server and verifies that Guardian can still review an escalated command and return its decision. GitOrigin-RevId: 5b712a3ee04e6896d5ca0cff39a32dd8e0fe0132
This commit is contained in:
@@ -149,6 +149,12 @@ impl Session {
|
||||
mut projection: McpRuntimeProjection,
|
||||
) -> BoxFuture<'a, McpRuntimeProjection> {
|
||||
Box::pin(async move {
|
||||
if crate::guardian::is_guardian_reviewer_source(
|
||||
&self.state.lock().await.session_configuration.session_source,
|
||||
) {
|
||||
return projection;
|
||||
}
|
||||
|
||||
let mut catalog = None;
|
||||
let mut registered = HashSet::new();
|
||||
for selected in environments.turn_environments() {
|
||||
|
||||
Reference in New Issue
Block a user