{"record":{"id":"a6a780342927a7e3","repo":"tinyhumansai/openhuman","slug":"missing-command-parameter","errorCode":null,"errorMessage":"Missing 'command' parameter","messagePattern":"Missing 'command' parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/shell.rs","lineNumber":293,"sourceCode":"        &self,\n        args: serde_json::Value,\n        _options: ToolCallOptions,\n        context: Option<&ToolExecutionContext>,\n    ) -> anyhow::Result<ToolResult> {\n        self.execute_in_context(args, context).await\n    }\n}\n\nimpl ShellTool {\n    async fn execute_in_context(\n        &self,\n        args: serde_json::Value,\n        context: Option<&ToolExecutionContext>,\n    ) -> anyhow::Result<ToolResult> {\n        let command = args\n            .get(\"command\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'command' parameter\"))?;\n\n        // Optional per-call wall-clock budget. `None`/`0` ⇒ run unbounded;\n        // a positive value is clamped downstream by\n        // `tool_timeout::explicit_call_timeout_*`. Shell has no default deadline\n        // (issue #4023) — long scripts must run to completion.\n        let requested_timeout = args.get(\"timeout_secs\").and_then(|v| v.as_u64());\n\n        let start = Instant::now();\n        let (allowed, result) = self\n            .run_with_security_in_context(command, requested_timeout, context)\n            .await;\n        let duration_ms = u64::try_from(start.elapsed().as_millis()).unwrap_or(u64::MAX);\n        // `allowed` = passed the in-tool security checks. `approved` = the command\n        // is Prompt-class (required human approval) and thus went through the\n        // harness ApprovalGate to reach here — distinct from `allowed`. Reads and\n        // Full-mode writes run without a prompt, so they audit as approved=false\n        // rather than over-claiming a human approval that never happened. (The\n        // gate's exact yes/no isn't threaded into tools; this is the accurate","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/shell.rs#L275-L311","documentation":"ShellTool's execute_in_context extracts the required 'command' string before option parsing, timeout policy, and security classification run; this fires when args omit 'command' or pass a non-string. No process is spawned.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/shell.rs:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the \"command\" string to execute in the shell tool arguments"],"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"}