openai/codex · error · anyhow::Error
ChatGPT backend requests require Codex backend auth
Error message
ChatGPT backend requests require Codex backend auth
What it means
Error "ChatGPT backend requests require Codex backend auth" thrown in openai/codex.
Source
Thrown at codex-rs/chatgpt/src/chatgpt_client.rs:74
config: &Config,
path: String,
) -> anyhow::Result<T> {
chatgpt_get_request_with_timeout(config, path, /*timeout*/ None).await
}
pub(crate) async fn chatgpt_get_request_with_timeout<T: DeserializeOwned>(
config: &Config,
path: String,
timeout: Option<Duration>,
) -> anyhow::Result<T> {
let chatgpt_base_url = &config.chatgpt_base_url;
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 backend requests require Codex backend auth"
);
anyhow::ensure!(
auth.get_account_id().is_some(),
"ChatGPT account ID not available, please re-run `codex login`"
);
let url = format!(
"{}/{}",
chatgpt_base_url.trim_end_matches('/'),
path.trim_start_matches('/')
);
let http_client_factory = config.http_client_factory();
let client = if http_client_factory.has_chatgpt_cookies() {
psp_chatgpt_client(http_client_factory)
} else {View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/chatgpt/src/chatgpt_client.rs:74 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/f6112c88bd625351.
Report an issue: GitHub.