openai/codex · error · std::io::Error
PermissionDenied
PermissionDenied
Error message
Login is restricted to workspace id(s) {}. What it means
Error "Login is restricted to workspace id(s) {}." thrown in openai/codex.
Source
Thrown at codex-rs/login/src/auth/manager.rs:1040
personal_access_token: None,
bedrock_api_key: None,
}
}
};
save_auth(
codex_home,
&auth_dot_json,
auth_credentials_store_mode,
keyring_backend_kind,
)
}
fn ensure_auth_workspace_allowed(
expected_workspace_ids: Option<&[String]>,
account_id: &str,
) -> std::io::Result<()> {
crate::server::ensure_workspace_account_allowed(expected_workspace_ids, account_id)
.map_err(|message| std::io::Error::new(std::io::ErrorKind::PermissionDenied, message))
}
fn ensure_agent_identity_workspace_allowed(
expected_workspace_ids: Option<&[String]>,
agent_identity: &AgentIdentityStorage,
) -> std::io::Result<()> {
let Some(expected_workspace_ids) = expected_workspace_ids else {
return Ok(());
};
match agent_identity {
AgentIdentityStorage::Jwt(jwt) => {
let record = AgentIdentityAuthRecord::from_agent_identity_jwt(jwt)?;
ensure_auth_workspace_allowed(Some(expected_workspace_ids), &record.account_id)
}
AgentIdentityStorage::Record(record) => {
ensure_auth_workspace_allowed(Some(expected_workspace_ids), &record.account_id)
}View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/login/src/auth/manager.rs:1040 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/d3c4cd09e5453cd0.
Report an issue: GitHub.