openai/codex · error
provider auth cwd must resolve
Error message
provider auth cwd must resolve: {err} What it means
Panic in default_provider_auth_cwd: neither the "." deserialization trick nor AbsolutePathBuf::current_dir() could produce a usable provider-auth working directory. This is a fallback-of-fallback failure, meaning the process has no resolvable current directory (e.g. cwd was deleted), so startup cannot continue.
Solutions
- Ensure the process is started from a valid, existing working directory
- Check filesystem mounts/permissions for the process cwd
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/protocol/src/config_types.rs:628 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/4c0fddac3802aea0.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/protocol/src/config_types.rs:628
DEFAULT_PROVIDER_AUTH_REFRESH_INTERVAL_MS
}
fn non_zero_u64(value: u64, field_name: &str) -> NonZeroU64 {
match NonZeroU64::new(value) {
Some(value) => value,
None => panic!("{field_name} must be non-zero"),
}
}
fn default_provider_auth_cwd() -> AbsolutePathBuf {
let deserializer = serde::de::value::StrDeserializer::<serde::de::value::Error>::new(".");
if let Ok(cwd) = AbsolutePathBuf::deserialize(deserializer) {
return cwd;
}
match AbsolutePathBuf::current_dir() {
Ok(cwd) => cwd,
Err(err) => panic!("provider auth cwd must resolve: {err}"),
}
}
fn is_default_provider_auth_cwd(path: &AbsolutePathBuf) -> bool {
path == &default_provider_auth_cwd()
}
/// Represents the trust level for a project directory.
/// This determines the approval policy and sandbox mode applied.
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Display, JsonSchema, TS)]
#[serde(rename_all = "lowercase")]
#[strum(serialize_all = "lowercase")]
pub enum TrustLevel {
Trusted,
Untrusted,
}
/// Controls whether the TUI uses the terminal's alternate screen buffer.View on GitHub (pinned to 339751715c)