openai/codex · error
bwrap is only supported on Linux
Error message
bwrap is only supported on Linux
What it means
Panic from the non-Linux bwrap main: the binary was built for a platform where the bubblewrap sandbox does not exist (bubblewrap is Linux-only). Any invocation on macOS/Windows immediately panics to make the unsupported platform explicit.
Solutions
- Run the sandbox shim on Linux only
- Use the platform-appropriate sandbox mechanism on other operating systems
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/bwrap/src/main.rs:44 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/40b4ae65198cbc71.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/bwrap/src/main.rs:44
// valid for the duration of the call.
let exit_code = unsafe { bwrap_main(cstrings.len() as libc::c_int, argv_ptrs.as_ptr()) };
std::process::exit(exit_code);
}
#[cfg(all(target_os = "linux", not(bwrap_available)))]
fn main() {
panic!(
r#"bubblewrap is not available in this build.
Notes:
- ensure the target OS is Linux
- libcap headers must be available via pkg-config
- bubblewrap sources expected at codex-rs/vendor/bubblewrap (default)"#
);
}
#[cfg(not(target_os = "linux"))]
fn main() {
panic!("bwrap is only supported on Linux");
}
View on GitHub (pinned to 339751715c)