{"record":{"id":"01cc89b2dbdd347e","repo":"openai/codex","slug":"guardian-review-session-could-not-clear-mcp-server","errorCode":null,"errorMessage":"guardian review session could not clear MCP servers: {err}","messagePattern":"guardian review session could not clear MCP servers: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/guardian/review_session.rs","lineNumber":1422,"sourceCode":"    ));\n    guardian_config.base_instructions_provenance = Some(BaseInstructionsProvenance::Custom);\n    guardian_config.notify = None;\n    guardian_config.developer_instructions = None;\n    guardian_config.permissions.approval_policy = Constrained::allow_only(AskForApproval::Never);\n    let guardian_permission_profile =\n        read_only_guardian_permission_profile(parent_config.permissions.permission_profile());\n    guardian_config\n        .permissions\n        .set_permission_profile(guardian_permission_profile)\n        .map_err(|err| {\n            anyhow::anyhow!(\"guardian review session could not set permission profile: {err}\")\n        })?;\n    guardian_config.include_apps_instructions = false;\n    guardian_config\n        .mcp_servers\n        .set(HashMap::new())\n        .map_err(|err| {\n            anyhow::anyhow!(\"guardian review session could not clear MCP servers: {err}\")\n        })?;\n    if let Some(live_network_config) = live_network_config\n        && guardian_config.permissions.network.is_some()\n    {\n        let network_constraints = guardian_config\n            .config_layer_stack\n            .requirements()\n            .network\n            .as_ref()\n            .map(|network| network.value.clone());\n        guardian_config.permissions.network = Some(NetworkProxySpec::from_config_and_constraints(\n            live_network_config,\n            network_constraints,\n            guardian_config.permissions.permission_profile(),\n        )?);\n    }\n    for feature in [\n        Feature::Collab,","sourceCodeStart":1404,"sourceCodeEnd":1440,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/guardian/review_session.rs#L1404-L1440","documentation":"Error \"guardian review session could not clear MCP servers: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/guardian/review_session.rs:1422 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Investigate why clearing MCP servers on the review session failed; see the reported error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}