{"record":{"id":"06ba1b7791f578f9","repo":"openai/codex","slug":"mcp-startup-cancelled","errorCode":null,"errorMessage":"MCP startup cancelled","messagePattern":"MCP startup cancelled","errorType":"exception","errorClass":"StartupOutcomeError","httpStatus":null,"severity":"error","filePath":"codex-rs/codex-mcp/src/rmcp_client.rs","lineNumber":584,"sourceCode":"    pub(crate) async fn listed_tools(&self) -> Option<Vec<ToolInfo>> {\n        // Plugin provenance is resolved per-session rather than stored in shared cache payloads.\n        if !self.startup_complete.load(Ordering::Acquire)\n            && let Some(startup_tools) = self.cached_tools()\n        {\n            Some(startup_tools)\n        } else {\n            match self.client().await {\n                Ok(client) => Some(client.listed_tools()),\n                Err(_) if self.is_codex_apps_mcp_server => self.cached_tools(),\n                Err(_) => None,\n            }\n        }\n    }\n}\n\n#[derive(Debug, Clone, thiserror::Error)]\npub(crate) enum StartupOutcomeError {\n    #[error(\"MCP startup cancelled\")]\n    Cancelled,\n    // We can't store the original error here because anyhow::Error doesn't implement\n    // `Clone`.\n    #[error(\"MCP startup failed: {error}\")]\n    Failed {\n        error: String,\n        is_authentication_required: bool,\n    },\n}\n\nimpl StartupOutcomeError {\n    pub(crate) fn is_authentication_required(&self) -> bool {\n        match self {\n            Self::Cancelled => false,\n            Self::Failed {\n                error,\n                is_authentication_required,\n            } => *is_authentication_required || error.contains(\"Auth required\"),","sourceCodeStart":566,"sourceCodeEnd":602,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/codex-mcp/src/rmcp_client.rs#L566-L602","documentation":"Error \"MCP startup cancelled\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/codex-mcp/src/rmcp_client.rs:584 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry starting the MCP server; avoid interrupting the startup sequence."],"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"}