{"record":{"id":"46e59021e7e466ae","repo":"openai/codex","slug":"chatgpt-auth-not-available-46e590","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/connectors.rs","lineNumber":50,"sourceCode":"const CONNECTOR_METADATA_TIMEOUT: Duration = Duration::from_secs(60);\nconst DEFAULT_APPS_PRODUCT_SKU: &str = \"codex\";\n\nasync fn apps_enabled(config: &Config) -> anyhow::Result<bool> {\n    let auth_manager =\n        AuthManager::shared_from_config(config, /*enable_codex_api_key_env*/ false).await?;\n    let auth = auth_manager.auth().await;\n    Ok(config\n        .features\n        .apps_enabled_for_auth(auth.as_ref().is_some_and(CodexAuth::uses_codex_backend)))\n}\n\nasync fn connector_auth(config: &Config) -> anyhow::Result<CodexAuth> {\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 connectors require Codex backend auth\"\n    );\n    Ok(auth)\n}\n\npub async fn list_connectors(config: &Config) -> anyhow::Result<Vec<AppInfo>> {\n    if !apps_enabled(config).await? {\n        return Ok(Vec::new());\n    }\n    let (connectors_result, accessible_result) = tokio::join!(\n        list_all_connectors(config),\n        list_accessible_connectors_from_mcp_tools(config),\n    );\n    let connectors = connectors_result?;\n    let accessible = accessible_result?;\n    Ok(","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/chatgpt/src/connectors.rs#L32-L68","documentation":"Guard in connector_auth: the shared AuthManager has no auth snapshot (not logged in), so there are no credentials to attach to connector list/metadata requests. The connectors feature is effectively unusable without login, and this error makes that explicit at auth-resolution time.","triggerScenarios":"Thrown at codex-rs/chatgpt/src/connectors.rs:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run codex login, then retry the connector listing","Disable/hide connector UI when auth is absent instead of calling connector APIs"],"exampleFix":null,"handlingStrategy":"validation","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"}