openai/codex · error

codex-linux-sandbox is only supported on Linux

Error message

codex-linux-sandbox is only supported on Linux

What it means

The codex-linux-sandbox entrypoint was invoked on a non-Linux operating system. This panic in the run_main fallback (compiled only under cfg(not(target_os = "linux"))) is a hard platform guard: all sandbox machinery (Landlock, bubblewrap, seccomp) is Linux-only, so there is no meaningful behavior to fall back to and the process aborts immediately.

Solutions

  1. Run the Linux sandbox helper only on Linux hosts
  2. Use the platform-appropriate sandbox implementation (e.g. Seatbelt on macOS) instead
  3. Check for a misconfigured build or script that ships the Linux binary to another OS
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/linux-sandbox/src/lib.rs:38 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/cc41e6132db2b8ed. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/linux-sandbox/src/lib.rs:38

#[cfg(target_os = "linux")]
mod linux_run_main;
#[cfg(target_os = "linux")]
mod proxy_lifecycle;
#[cfg(target_os = "linux")]
mod proxy_routing;

/// Exit status returned when bundled bubblewrap fails digest verification.
#[cfg(target_os = "linux")]
pub const BUNDLED_BWRAP_DIGEST_VERIFICATION_FAILURE_EXIT_CODE: i32 = 8;

#[cfg(target_os = "linux")]
pub fn run_main() -> ! {
    linux_run_main::run_main();
}

#[cfg(not(target_os = "linux"))]
pub fn run_main() -> ! {
    panic!("codex-linux-sandbox is only supported on Linux");
}

View on GitHub (pinned to 339751715c)