openai/codex · error · anyhow::Error
`codex agents` is unavailable while workload identity is…
Error message
`codex agents` is unavailable while workload identity is active
What it means
Bailed while preparing the `codex agents` remote session when workload identity auth is the selected auth mode. Agents remote functionality is incompatible with workload identity, so the command refuses to start rather than failing mid-session.
Solutions
- Switch to ChatGPT/API-key auth (e.g. `codex login`) before using `codex agents`
- Remove the workload identity config selection
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/cli/src/main.rs:1123 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/543e8614772bc5ad.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/cli/src/main.rs:1123
|| interactive.oss_provider.is_some()
|| !interactive.add_dir.is_empty()
|| interactive
.config_overrides
.parse_overrides()
.map_err(anyhow::Error::msg)?
.iter()
.any(|(key, value)| {
key == "sandbox_workspace_write.writable_roots"
|| (key == "sandbox_workspace_write"
&& value.get("writable_roots").is_some())
}))
{
anyhow::bail!(
"`codex agents` cannot apply local provider or additional-directory overrides to a remote server"
);
}
if is_workload_identity_selected() {
anyhow::bail!(
"`codex agents` is unavailable while workload identity is active"
);
}
if root_remote.is_none() {
resolve_remote_endpoint(
/*remote*/ None,
root_remote_auth_token_env.clone(),
)?;
#[cfg(not(unix))]
anyhow::bail!("`codex agents` requires `--remote` on this platform");
}
interactive.agents_overview = true;
}
let exit_info = run_interactive_tui(
interactive,
root_remote.clone(),
root_remote_auth_token_env.clone(),
arg0_paths.clone(),View on GitHub (pinned to 339751715c)