openai/codex · error · LegacyAppPathStringError

path URI `{path}` cannot be rendered using {convention} path

Error message

path URI `{path}` cannot be rendered using {convention} path syntax

What it means

Error "path URI `{path}` cannot be rendered using {convention} path syntax" thrown in openai/codex.

Source

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

fn decode_native_segment(segment: &str) -> String {
    // Decode exactly once. Thus `%20` becomes a space and `%252F` becomes the
    // literal text `%2F`, rather than being decoded a second time into `/`.
    let bytes = urlencoding::decode_binary(segment.as_bytes());
    String::from_utf8_lossy(&bytes).into_owned()
}

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)

When it happens

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