{"record":{"id":"a0b7bb0318ceedda","repo":"openai/codex","slug":"chatgpt-auth-not-available","errorCode":null,"errorMessage":"ChatGPT auth not available","messagePattern":"ChatGPT auth not available","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/chatgpt/src/chatgpt_client.rs","lineNumber":73,"sourceCode":"pub(crate) async fn chatgpt_get_request<T: DeserializeOwned>(\n    config: &Config,\n    path: String,\n) -> anyhow::Result<T> {\n    chatgpt_get_request_with_timeout(config, path, /*timeout*/ None).await\n}\n\npub(crate) async fn chatgpt_get_request_with_timeout<T: DeserializeOwned>(\n    config: &Config,\n    path: String,\n    timeout: Option<Duration>,\n) -> anyhow::Result<T> {\n    let chatgpt_base_url = &config.chatgpt_base_url;\n    let auth_manager =\n        AuthManager::shared_from_config(config, /*enable_codex_api_key_env*/ false).await?;\n    let auth = auth_manager\n        .auth()\n        .await\n        .ok_or_else(|| anyhow::anyhow!(\"ChatGPT auth not available\"))?;\n    anyhow::ensure!(\n        auth.uses_codex_backend(),\n        \"ChatGPT backend requests require Codex backend auth\"\n    );\n    anyhow::ensure!(\n        auth.get_account_id().is_some(),\n        \"ChatGPT account ID not available, please re-run `codex login`\"\n    );\n\n    let url = format!(\n        \"{}/{}\",\n        chatgpt_base_url.trim_end_matches('/'),\n        path.trim_start_matches('/')\n    );\n\n    let http_client_factory = config.http_client_factory();\n    let client = if http_client_factory.has_chatgpt_cookies() {\n        psp_chatgpt_client(http_client_factory)","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/chatgpt/src/chatgpt_client.rs#L55-L91","documentation":"Error \"ChatGPT auth not available\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/chatgpt/src/chatgpt_client.rs:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}