openai/codex · error · SandboxErr

sandbox denied exec error, exit code: {}, stdout: {}, stderr

Error message

sandbox denied exec error, exit code: {}, stdout: {}, stderr: {}

What it means

Error "sandbox denied exec error, exit code: {}, stdout: {}, stderr: {}" thrown in openai/codex.

Source

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

use codex_utils_string::truncate_middle_with_token_budget;
use http::StatusCode;
use serde_json;
use std::fmt;
use std::io;
use std::time::Duration;
use strum_macros::EnumDiscriminants;
use thiserror::Error;
use tokio::task::JoinError;

pub type Result<T> = std::result::Result<T, CodexErr>;

/// Limit UI error messages to a reasonable size while keeping useful context.
const ERROR_MESSAGE_UI_MAX_BYTES: usize = 2 * 1024;

#[derive(Error, Debug)]
pub enum SandboxErr {
    /// Error from sandbox execution
    #[error(
        "sandbox denied exec error, exit code: {}, stdout: {}, stderr: {}",
        .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),

View on GitHub (pinned to 339751715c)

When it happens

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