openai/codex · error · io::Error
packaged defaults config file {} has no parent directory
Error message
packaged defaults config file {} has no parent directory What it means
Error "packaged defaults config file {} has no parent directory" thrown in openai/codex.
Source
Thrown at codex-rs/config/src/loader/mod.rs:156
strict_config,
cloud_config_bundle,
} = options.into();
let packaged_defaults_layer = if let Some(file) = &overrides.packaged_defaults_path {
let config = layer_io::read_config_from_path(
fs,
file,
/*log_missing_as_info*/ false,
strict_config,
)
.await?
.ok_or_else(|| {
io::Error::new(
io::ErrorKind::NotFound,
format!("packaged defaults config file {} not found", file.display()),
)
})?;
let base_dir = file.as_path().parent().ok_or_else(|| {
io::Error::new(
io::ErrorKind::InvalidData,
format!(
"packaged defaults config file {} has no parent directory",
file.display()
),
)
})?;
ConfigLayerEntry::new(
ConfigLayerSource::PackagedDefaults { file: file.clone() },
resolve_relative_paths_in_config_toml(config, base_dir)?,
)
} else {
let file = AbsolutePathBuf::from_absolute_path(std::env::current_exe()?)?;
let raw_toml = include_str!("../../defaults.toml");
let config = toml::from_str(raw_toml).map_err(|error| {
io::Error::new(
io::ErrorKind::InvalidData,
format!("invalid embedded packaged defaults; this is a Codex build error: {error}"),View on GitHub (pinned to 339751715c)
Solutions
- Fix the packaged defaults path to live inside a valid directory; this is a packaging/build error.
When it happens
Trigger: Thrown at codex-rs/config/src/loader/mod.rs:156 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/645106efaf81cd65.
Report an issue: GitHub.