openai/codex · error · anyhow::Error
ChatGPT auth not available
Error message
ChatGPT auth not available
What it means
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.
Solutions
- Run codex login, then retry the connector listing
- Disable/hide connector UI when auth is absent instead of calling connector APIs
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/chatgpt/src/connectors.rs:50 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/46e59021e7e466ae.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/chatgpt/src/connectors.rs:50
const CONNECTOR_METADATA_TIMEOUT: Duration = Duration::from_secs(60);
const DEFAULT_APPS_PRODUCT_SKU: &str = "codex";
async fn apps_enabled(config: &Config) -> anyhow::Result<bool> {
let auth_manager =
AuthManager::shared_from_config(config, /*enable_codex_api_key_env*/ false).await?;
let auth = auth_manager.auth().await;
Ok(config
.features
.apps_enabled_for_auth(auth.as_ref().is_some_and(CodexAuth::uses_codex_backend)))
}
async fn connector_auth(config: &Config) -> anyhow::Result<CodexAuth> {
let auth_manager =
AuthManager::shared_from_config(config, /*enable_codex_api_key_env*/ false).await?;
let auth = auth_manager
.auth()
.await
.ok_or_else(|| anyhow::anyhow!("ChatGPT auth not available"))?;
anyhow::ensure!(
auth.uses_codex_backend(),
"ChatGPT connectors require Codex backend auth"
);
Ok(auth)
}
pub async fn list_connectors(config: &Config) -> anyhow::Result<Vec<AppInfo>> {
if !apps_enabled(config).await? {
return Ok(Vec::new());
}
let (connectors_result, accessible_result) = tokio::join!(
list_all_connectors(config),
list_accessible_connectors_from_mcp_tools(config),
);
let connectors = connectors_result?;
let accessible = accessible_result?;
Ok(View on GitHub (pinned to 339751715c)