openai/codex · error · StartupOutcomeError

MCP startup cancelled

Error message

MCP startup cancelled

What it means

Error "MCP startup cancelled" thrown in openai/codex.

Source

Thrown at codex-rs/codex-mcp/src/rmcp_client.rs:584

    pub(crate) async fn listed_tools(&self) -> Option<Vec<ToolInfo>> {
        // Plugin provenance is resolved per-session rather than stored in shared cache payloads.
        if !self.startup_complete.load(Ordering::Acquire)
            && let Some(startup_tools) = self.cached_tools()
        {
            Some(startup_tools)
        } else {
            match self.client().await {
                Ok(client) => Some(client.listed_tools()),
                Err(_) if self.is_codex_apps_mcp_server => self.cached_tools(),
                Err(_) => None,
            }
        }
    }
}

#[derive(Debug, Clone, thiserror::Error)]
pub(crate) enum StartupOutcomeError {
    #[error("MCP startup cancelled")]
    Cancelled,
    // We can't store the original error here because anyhow::Error doesn't implement
    // `Clone`.
    #[error("MCP startup failed: {error}")]
    Failed {
        error: String,
        is_authentication_required: bool,
    },
}

impl StartupOutcomeError {
    pub(crate) fn is_authentication_required(&self) -> bool {
        match self {
            Self::Cancelled => false,
            Self::Failed {
                error,
                is_authentication_required,
            } => *is_authentication_required || error.contains("Auth required"),

View on GitHub (pinned to 339751715c)

Solutions

  1. Retry starting the MCP server; avoid interrupting the startup sequence.

When it happens

Trigger: Thrown at codex-rs/codex-mcp/src/rmcp_client.rs:584 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/06ba1b7791f578f9. Report an issue: GitHub.