openai/codex · error

codex-linux-sandbox executable not found

Error message

codex-linux-sandbox executable not found

What it means

Landlock branch of run_command_under_sandbox: the codex-linux-sandbox helper executable could not be located via config/arg0 paths, so the sandbox cannot be set up. It is a missing-external-tool error, not a sandbox denial.

Solutions

  1. Install or build codex-linux-sandbox so it is resolvable
  2. Point the config/env at the codex-linux-sandbox executable location
  3. Use the packaged release where the binary ships alongside codex
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at codex-rs/cli/src/debug_sandbox.rs:415 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/2a7050e53a27b317. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/cli/src/debug_sandbox.rs:415

                args,
                /*arg0*/ None,
                cwd.to_path_buf(),
                network_sandbox_policy,
                env,
                |env_map| {
                    env_map.insert(CODEX_SANDBOX_ENV_VAR.to_string(), "seatbelt".to_string());
                    if let Some(network) = network.as_ref() {
                        network.apply_to_env(env_map);
                    }
                },
            )
            .await?
        }
        SandboxType::Landlock => {
            #[expect(clippy::expect_used)]
            let codex_linux_sandbox_exe = config
                .codex_linux_sandbox_exe
                .expect("codex-linux-sandbox executable not found");
            let network_sandbox_policy = runtime_permission_profile.network_sandbox_policy();
            let args = create_linux_sandbox_command_args_for_permission_profile(
                command,
                cwd.as_path(),
                &runtime_permission_profile,
                sandbox_policy_cwd.as_path(),
                use_legacy_landlock,
                allow_network_for_proxy(enforce_managed_network),
            );
            spawn_debug_sandbox_child(
                codex_linux_sandbox_exe,
                args,
                Some("codex-linux-sandbox"),
                cwd.to_path_buf(),
                network_sandbox_policy,
                env,
                |env_map| {
                    if let Some(network) = network.as_ref() {

View on GitHub (pinned to 339751715c)