openai/codex · error · AgentIdentityAuthError

agent identity bootstrap unavailable after {attempts} attemp

Error message

agent identity bootstrap unavailable after {attempts} attempts during {operation}: {message}

What it means

Error "agent identity bootstrap unavailable after {attempts} attempts during {operation}: {message}" thrown in openai/codex.

Source

Thrown at codex-rs/login/src/auth/agent_identity.rs:83

            Ok(base_url)
        }
        (Err(error), _) => Err(std::io::Error::other(error)),
    }
}

pub(super) fn require_agent_identity_authapi_base_url(
    agent_identity_authapi_base_url: Option<&str>,
) -> std::io::Result<&str> {
    agent_identity_authapi_base_url.ok_or_else(|| {
        std::io::Error::other(
            "Agent Identity only supports production and staging ChatGPT environments",
        )
    })
}

#[derive(Clone, Debug, Error)]
pub enum AgentIdentityAuthError {
    #[error(
        "agent identity bootstrap unavailable after {attempts} attempts during {operation}: {message}"
    )]
    BootstrapUnavailable {
        operation: &'static str,
        attempts: usize,
        message: String,
    },
}

impl AgentIdentityAuthError {
    pub(super) fn bootstrap_unavailable(error: &std::io::Error) -> Option<&Self> {
        match error
            .get_ref()
            .and_then(|source| source.downcast_ref::<Self>())
        {
            Some(error @ Self::BootstrapUnavailable { .. }) => Some(error),
            None => None,
        }

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/login/src/auth/agent_identity.rs:83 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/772254d3dfe7d137. Report an issue: GitHub.