tinyhumansai/openhuman · error

Failed to execute command: {e}

Error message

Failed to execute command: {e}

What it means

execute_unsandboxed's tokio Command::output() returned an error — the jailed-spawn machinery was bypassed (unsandboxed path) and the OS itself refused to run the command (missing binary, exec format, permission). Distinct from a non-zero exit, which returns normally.

Source

Thrown at src/openhuman/sandbox/ops.rs:189

    cmd.env_clear();
    for var in SANDBOX_ENV_PASSTHROUGH {
        if let Ok(val) = std::env::var(var) {
            cmd.env(var, val);
        }
    }
    for (k, v) in extra_env {
        cmd.env(k, v);
    }

    let result = tokio::time::timeout(timeout, cmd.output()).await;
    match result {
        Ok(Ok(output)) => Ok(SandboxExecResult {
            exit_code: output.status.code().unwrap_or(-1),
            stdout: String::from_utf8_lossy(&output.stdout).to_string(),
            stderr: String::from_utf8_lossy(&output.stderr).to_string(),
            timed_out: false,
        }),
        Ok(Err(e)) => anyhow::bail!("Failed to execute command: {e}"),
        Err(_) => Ok(SandboxExecResult {
            exit_code: -1,
            stdout: String::new(),
            stderr: format!("Command timed out after {}s", timeout.as_secs()),
            timed_out: true,
        }),
    }
}

/// Execute via the OS-level `cwd_jail` backend (Landlock/Seatbelt/AppContainer).
///
/// Output capture: some OS backends (macOS Seatbelt) rebuild the command
/// internally and don't forward piped stdio settings. We capture output
/// by wrapping the command to redirect stdout/stderr to temp files inside
/// the jail root, then reading them back after exit.
async fn execute_local_jail(
    policy: &SandboxPolicy,
    command: &str,

View on GitHub (pinned to 7491200858)

Solutions

  1. Verify the command binary exists and is executable on PATH
  2. Check the interpreter/shebang and file permissions
  3. Read {e} for the OS-level errno
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/sandbox/ops.rs:189 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/1549e05d8afff301. Report an issue: GitHub.