openai/codex · error · anyhow::Error

missing sandboxed command in windows sandbox wrapper request

Error message

missing sandboxed command in windows sandbox wrapper request

What it means

Error "missing sandboxed command in windows sandbox wrapper request" thrown in openai/codex.

Source

Thrown at codex-rs/windows-sandbox-rs/src/wrapper.rs:180

    workspace_roots: Vec<AbsolutePathBuf>,
    env_map: HashMap<String, String>,
    permission_profile: PermissionProfile,
    windows_sandbox_level: WindowsSandboxLevel,
    windows_sandbox_private_desktop: bool,
    proxy_enforced: bool,
    network_proxy_restricting_sid: Option<String>,
    proxy_settings_mode: crate::WindowsSandboxProxySettingsMode,
    read_roots_override: Option<Vec<PathBuf>>,
    read_roots_include_platform_defaults: bool,
    write_roots_override: Option<Vec<PathBuf>>,
    deny_read_paths_override: Vec<AbsolutePathBuf>,
    deny_write_paths_override: Vec<AbsolutePathBuf>,
    command: Vec<String>,
}

async fn run_windows_sandbox_wrapper_request(request: WindowsSandboxWrapperRequest) -> Result<i32> {
    if request.command.is_empty() {
        bail!("missing sandboxed command in windows sandbox wrapper request");
    }
    let spawned =
        crate::spawn_windows_sandbox_session_for_level(crate::WindowsSandboxSessionRequest {
            permission_profile: &request.permission_profile,
            workspace_roots: request.workspace_roots.as_slice(),
            codex_home: request.codex_home.as_path(),
            command: request.command,
            cwd: request.command_cwd.as_path(),
            env_map: request.env_map,
            windows_sandbox_level: request.windows_sandbox_level,
            proxy_enforced: request.proxy_enforced,
            network_proxy_restricting_sid: request.network_proxy_restricting_sid,
            proxy_settings_mode: request.proxy_settings_mode,
            timeout_ms: None,
            read_roots_override: request.read_roots_override.as_deref(),
            read_roots_include_platform_defaults: request.read_roots_include_platform_defaults,
            write_roots_override: request.write_roots_override.as_deref(),
            deny_read_paths_override: request.deny_read_paths_override.as_slice(),

View on GitHub (pinned to 339751715c)

Solutions

  1. Include the sandboxed command after the -- separator in the wrapper invocation.

When it happens

Trigger: Thrown at codex-rs/windows-sandbox-rs/src/wrapper.rs:180 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/912057394ff9ea28. Report an issue: GitHub.