openai/codex · error · LegacyAppPathStringError

path ` ` is not absolute

Error message

path `{path}` is not absolute{convention}

What it means

The NotAbsolute variant of LegacyAppPathStringError: render_windows_path received a path that is not absolute; the optional convention suffix in the message names the expected syntax. Legacy app path strings must start from a root, so relative input is rejected.

Solutions

  1. Canonicalize the path to an absolute form before rendering
  2. Prepend the intended root (drive or UNC prefix) to the relative path
  3. Validate for absoluteness earlier in the pipeline and reject there
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/utils/path-uri/src/api_path_string.rs:359 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/9c9ba3e6b8e76f61. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/utils/path-uri/src/api_path_string.rs:359

}

fn incompatible_convention(path: &PathUri, convention: PathConvention) -> LegacyAppPathStringError {
    LegacyAppPathStringError::IncompatibleConvention {
        path: path.to_string(),
        convention,
    }
}

#[derive(Debug, Error, PartialEq, Eq)]
pub enum LegacyAppPathStringError {
    #[error("opaque fallback path URI `{path}` cannot be recovered as a native path")]
    OpaqueFallback { path: String },
    #[error("path URI `{path}` cannot be rendered using {convention} path syntax")]
    IncompatibleConvention {
        path: String,
        convention: PathConvention,
    },
    #[error(
        "path `{path}` is not absolute{convention}",
        convention = .convention.map(|convention| format!(" using {convention} path syntax")).unwrap_or_default()
    )]
    InvalidNativePath {
        path: String,
        convention: Option<PathConvention>,
    },
}

#[cfg(test)]
#[path = "api_path_string_tests.rs"]
mod tests;

View on GitHub (pinned to 339751715c)