openai/codex · error · anyhow::Error
NtCreateFile returned an invalid sandbox ACL directory handl
Error message
NtCreateFile returned an invalid sandbox ACL directory handle
What it means
Error "NtCreateFile returned an invalid sandbox ACL directory handle" thrown in openai/codex.
Source
Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/no_reparse_dir.rs:143
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
FILE_OPEN_IF,
FILE_DIRECTORY_FILE,
ptr::null(),
/*ea_length*/ 0,
)
};
if status < 0 {
if status == STATUS_REPARSE_POINT_ENCOUNTERED {
bail!(
"sandbox ACL path contains a reparse point: {}",
path.display()
);
}
let error = unsafe { RtlNtStatusToDosError(status) };
return Err(std::io::Error::from_raw_os_error(error as i32))
.with_context(|| format!("open sandbox ACL directory {}", path.display()));
}
ensure!(
handle != 0 && handle != INVALID_HANDLE_VALUE,
"NtCreateFile returned an invalid sandbox ACL directory handle"
);
Ok(unsafe { OwnedHandle::from_raw_handle(handle as *mut c_void) })
}
#[cfg(test)]
#[path = "no_reparse_dir_tests.rs"]
mod tests;
View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/no_reparse_dir.rs:143 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/dbbe8ba3fec37472.
Report an issue: GitHub.