openai/codex · error · io::Error

no-follow filesystem operations require a normalized path

Error message

no-follow filesystem operations require a normalized path

What it means

Error "no-follow filesystem operations require a normalized path" thrown in openai/codex.

Source

Thrown at codex-rs/exec-server/src/no_follow/unix.rs:53

#[cfg(not(any(target_os = "linux", target_os = "android", target_vendor = "apple")))]
fn directory_access_flags() -> OFlags {
    OFlags::RDONLY
}

fn components(path: &Path) -> io::Result<Vec<OsString>> {
    if !path.is_absolute() {
        return Err(io::Error::new(
            io::ErrorKind::InvalidInput,
            "no-follow filesystem operations require an absolute path",
        ));
    }
    path.components()
        .filter_map(|component| match component {
            Component::RootDir => None,
            Component::Normal(component) => Some(Ok(component.to_os_string())),
            Component::CurDir | Component::ParentDir | Component::Prefix(_) => {
                Some(Err(io::Error::new(
                    io::ErrorKind::InvalidInput,
                    "no-follow filesystem operations require a normalized path",
                )))
            }
        })
        .collect()
}

fn root() -> io::Result<OwnedFd> {
    open(
        "/",
        directory_access_flags() | OFlags::DIRECTORY | OFlags::CLOEXEC,
        Mode::empty(),
    )
    .map_err(io::Error::from)
}

fn open_directory(parent: &OwnedFd, name: &OsString) -> io::Result<OwnedFd> {

View on GitHub (pinned to 339751715c)

Solutions

  1. Pass a normalized path without redundant components.

When it happens

Trigger: Thrown at codex-rs/exec-server/src/no_follow/unix.rs:53 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/38177b8b0f75dd2d. Report an issue: GitHub.