openai/codex · error
remote exec-server registration requires ChatGPT authenticat
Error message
remote exec-server registration requires ChatGPT authentication or API key authentication; run `codex login` or set CODEX_API_KEY
What it means
Error "remote exec-server registration requires ChatGPT authentication or API key authentication; run `codex login` or set CODEX_API_KEY" thrown in openai/codex.
Source
Thrown at codex-rs/cli/src/main.rs:2109
}
Ok(builder.build().await?)
}
async fn load_exec_server_remote_auth(
config: &codex_core::config::Config,
missing_auth_error: &'static str,
) -> anyhow::Result<(Arc<AuthManager>, codex_login::CodexAuth)> {
let auth_manager =
AuthManager::shared_from_config(config, /*enable_codex_api_key_env*/ true).await?;
let auth = match auth_manager.auth().await {
Some(auth) => auth,
None => {
auth_manager.reload().await;
auth_manager
.auth()
.await
.ok_or_else(|| anyhow::anyhow!(missing_auth_error))?
}
};
Ok((auth_manager, auth))
}
async fn enable_feature_in_config(feature: &str) -> anyhow::Result<()> {
FeatureToggles::validate_feature(feature)?;
let codex_home = find_codex_home()?;
ConfigEditsBuilder::new(&codex_home)
.set_feature_enabled(feature, /*enabled*/ true)
.apply()
.await?;
println!("Enabled feature `{feature}` in config.toml.");
maybe_print_under_development_feature_warning(&codex_home, feature);
Ok(())
}
View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/cli/src/main.rs:2109 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/eee9b68b92226391.
Report an issue: GitHub.