openai/codex · error · SandboxErr

command timed out

Error message

command timed out

What it means

Thrown by the exec tool chain when a sandboxed command exceeded its allotted execution time and the runner killed it. The Timeout variant carries the partial ExecToolCallOutput (exit code, stdout, stderr) captured before termination, so callers can report what the command managed to produce.

Solutions

  1. Increase the timeout budget for the command or run it in the background and poll for completion
  2. Reduce the scope of the command so it finishes sooner (narrower search paths, fewer files)
  3. Check the captured stdout/stderr in the variant payload to see how far the command got before being killed
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at codex-rs/protocol/src/error.rs:58 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/d79a816b12a07e35. Report an issue: GitHub.

Appendix: source

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

        .output.exit_code, .output.stdout.text, .output.stderr.text
    )]
    Denied {
        output: Box<ExecToolCallOutput>,
        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)]

View on GitHub (pinned to 339751715c)