{"record":{"id":"1549e05d8afff301","repo":"tinyhumansai/openhuman","slug":"failed-to-execute-command-e","errorCode":null,"errorMessage":"Failed to execute command: {e}","messagePattern":"Failed to execute command: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/sandbox/ops.rs","lineNumber":189,"sourceCode":"    cmd.env_clear();\n    for var in SANDBOX_ENV_PASSTHROUGH {\n        if let Ok(val) = std::env::var(var) {\n            cmd.env(var, val);\n        }\n    }\n    for (k, v) in extra_env {\n        cmd.env(k, v);\n    }\n\n    let result = tokio::time::timeout(timeout, cmd.output()).await;\n    match result {\n        Ok(Ok(output)) => Ok(SandboxExecResult {\n            exit_code: output.status.code().unwrap_or(-1),\n            stdout: String::from_utf8_lossy(&output.stdout).to_string(),\n            stderr: String::from_utf8_lossy(&output.stderr).to_string(),\n            timed_out: false,\n        }),\n        Ok(Err(e)) => anyhow::bail!(\"Failed to execute command: {e}\"),\n        Err(_) => Ok(SandboxExecResult {\n            exit_code: -1,\n            stdout: String::new(),\n            stderr: format!(\"Command timed out after {}s\", timeout.as_secs()),\n            timed_out: true,\n        }),\n    }\n}\n\n/// Execute via the OS-level `cwd_jail` backend (Landlock/Seatbelt/AppContainer).\n///\n/// Output capture: some OS backends (macOS Seatbelt) rebuild the command\n/// internally and don't forward piped stdio settings. We capture output\n/// by wrapping the command to redirect stdout/stderr to temp files inside\n/// the jail root, then reading them back after exit.\nasync fn execute_local_jail(\n    policy: &SandboxPolicy,\n    command: &str,","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/sandbox/ops.rs#L171-L207","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/sandbox/ops.rs:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the command binary exists and is executable on PATH","Check the interpreter/shebang and file permissions","Read {e} for the OS-level errno"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}