{"record":{"id":"772254d3dfe7d137","repo":"openai/codex","slug":"agent-identity-bootstrap-unavailable-after-attemp","errorCode":null,"errorMessage":"agent identity bootstrap unavailable after {attempts} attempts during {operation}: {message}","messagePattern":"agent identity bootstrap unavailable after (.+?) attempts during (.+?): (.+?)","errorType":"exception","errorClass":"AgentIdentityAuthError","httpStatus":null,"severity":"error","filePath":"codex-rs/login/src/auth/agent_identity.rs","lineNumber":83,"sourceCode":"            Ok(base_url)\n        }\n        (Err(error), _) => Err(std::io::Error::other(error)),\n    }\n}\n\npub(super) fn require_agent_identity_authapi_base_url(\n    agent_identity_authapi_base_url: Option<&str>,\n) -> std::io::Result<&str> {\n    agent_identity_authapi_base_url.ok_or_else(|| {\n        std::io::Error::other(\n            \"Agent Identity only supports production and staging ChatGPT environments\",\n        )\n    })\n}\n\n#[derive(Clone, Debug, Error)]\npub enum AgentIdentityAuthError {\n    #[error(\n        \"agent identity bootstrap unavailable after {attempts} attempts during {operation}: {message}\"\n    )]\n    BootstrapUnavailable {\n        operation: &'static str,\n        attempts: usize,\n        message: String,\n    },\n}\n\nimpl AgentIdentityAuthError {\n    pub(super) fn bootstrap_unavailable(error: &std::io::Error) -> Option<&Self> {\n        match error\n            .get_ref()\n            .and_then(|source| source.downcast_ref::<Self>())\n        {\n            Some(error @ Self::BootstrapUnavailable { .. }) => Some(error),\n            None => None,\n        }","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/login/src/auth/agent_identity.rs#L65-L101","documentation":"Sentinel variant of AgentIdentityAuthError: the agent-identity auth flow gave up after a bounded number of bootstrap attempts during a named operation. It wraps the last failure message and signals that retrying the whole login flow is the expected recovery, since bootstrap failures are typically transient (network or auth-server issues).","triggerScenarios":"Thrown at codex-rs/login/src/auth/agent_identity.rs:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the agent identity login flow from the start after a short backoff","Inspect the embedded message to see the underlying per-attempt failure and address it","If attempts repeatedly fail, verify network reachability of the ChatGPT auth environment"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}