openai/codex · error

No command specified to execute.

Error message

No command specified to execute.

What it means

The sandbox helper was started with no command after the `--` separator. This guard in run_main fires when LandlockCommand::parse() yields an empty command vector, meaning the caller (codex core) constructed an invalid sandbox invocation; the helper has nothing to exec and aborts rather than sandboxing nothing.

Solutions

  1. Ensure the command vector passed to the sandbox helper is non-empty before launching it
  2. Check argument parsing/ordering in the caller so the user command lands after `--`
  3. Report as an internal bug if it reproduces with a normal codex invocation
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:174 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/efa633a9005c7fc8. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:174

///    filesystem view.
/// 2. Apply in-process restrictions (no_new_privs + seccomp).
/// 3. `execvp` into the final command.
pub fn run_main() -> ! {
    let LandlockCommand {
        sandbox_policy_cwd,
        command_cwd,
        permission_profile,
        use_legacy_landlock,
        apply_seccomp_then_exec,
        allow_network_for_proxy,
        proxy_route_spec,
        verify_fd_mounts,
        no_proc,
        command,
    } = LandlockCommand::parse();

    if command.is_empty() {
        panic!("No command specified to execute.");
    }
    if !apply_seccomp_then_exec && !verify_fd_mounts.is_empty() {
        panic!("--verify-fd-mount is only supported in the inner sandbox stage");
    }
    ensure_inner_stage_mode_is_valid(apply_seccomp_then_exec, use_legacy_landlock);
    let EffectivePermissions {
        permission_profile,
        mut file_system_sandbox_policy,
        network_sandbox_policy,
    } = resolve_permission_profile(permission_profile).unwrap_or_else(|err| panic!("{err}"));
    ensure_legacy_landlock_mode_supports_policy(
        use_legacy_landlock,
        &file_system_sandbox_policy,
        network_sandbox_policy,
        &sandbox_policy_cwd,
    );

    // Inner stage: apply seccomp/no_new_privs after bubblewrap has already

View on GitHub (pinned to 339751715c)