openai/codex · error · SandboxErr

command was killed by a signal

Error message

command was killed by a signal

What it means

Variant of the protocol exec error set when the spawned process terminated because the OS delivered a fatal signal rather than exiting normally. The i32 payload is the signal number (e.g. SIGKILL/SIGSEGV); it typically fires when the sandbox, the OOM killer, or the timeout enforcement kills the child.

Solutions

  1. Inspect the signal number: SIGKILL often means the sandbox or OOM killer intervened; SIGSEGV/SIGABRT indicate a crash in the executed program
  2. Rerun the command outside the sandbox or with more memory to distinguish resource kills from genuine crashes
  3. Fix the executed program if the signal indicates a bug (segfault, abort)
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at codex-rs/protocol/src/error.rs:62 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/d40c45b6c94ab237. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/protocol/src/error.rs:62

        network_policy_decision: Option<NetworkPolicyDecisionPayload>,
    },

    /// Error from linux seccomp filter setup
    #[cfg(target_os = "linux")]
    #[error("seccomp setup error")]
    SeccompInstall(#[from] seccompiler::Error),

    /// Error from linux seccomp backend
    #[cfg(target_os = "linux")]
    #[error("seccomp backend error")]
    SeccompBackend(#[from] seccompiler::BackendError),

    /// Command timed out
    #[error("command timed out")]
    Timeout { output: Box<ExecToolCallOutput> },

    /// Command was killed by a signal
    #[error("command was killed by a signal")]
    Signal(i32),

    /// Error from linux landlock
    #[error("Landlock was not able to fully enforce all sandbox rules")]
    LandlockRestrict,
}

pub struct CodexErr {
    details: CodexErrorDetails,
    retry_delay: Option<Duration>,
}

/// The semantic category and diagnostic payload for a [`CodexErr`].
#[derive(Error, Debug, EnumDiscriminants)]
#[strum_discriminants(name(CodexErrKind))]
#[strum_discriminants(derive(serde::Serialize))]
#[strum_discriminants(serde(rename_all = "snake_case"))]
#[strum_discriminants(doc = "The payload-free semantic category used for analytics.")]

View on GitHub (pinned to 339751715c)