{"record":{"id":"8d92bc92dfa8111f","repo":"tinyhumansai/openhuman","slug":"missing-prompt-parameter","errorCode":null,"errorMessage":"Missing 'prompt' parameter","messagePattern":"Missing 'prompt' parameter","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/tools/delegate.rs","lineNumber":136,"sourceCode":"        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let agent_name = args\n            .get(\"agent\")\n            .and_then(|v| v.as_str())\n            .map(str::trim)\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'agent' parameter\"))?;\n\n        if agent_name.is_empty() {\n            return Ok(ToolResult::error(\"'agent' parameter must not be empty\"));\n        }\n\n        let prompt = args\n            .get(\"prompt\")\n            .and_then(|v| v.as_str())\n            .map(str::trim)\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'prompt' parameter\"))?;\n\n        if prompt.is_empty() {\n            return Ok(ToolResult::error(\"'prompt' parameter must not be empty\"));\n        }\n\n        let context = args\n            .get(\"context\")\n            .and_then(|v| v.as_str())\n            .map(str::trim)\n            .unwrap_or(\"\");\n\n        // Look up agent config\n        let agent_config = match self.agents.get(agent_name) {\n            Some(cfg) => cfg,\n            None => {\n                let available: Vec<&str> =\n                    self.agents.keys().map(|s: &String| s.as_str()).collect();\n                return Ok(ToolResult::error(format!(","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/tools/delegate.rs#L118-L154","documentation":"The delegate tool was invoked without a `prompt` argument (absent, not a string, or whitespace-only after trim). Guard on the tool-call arguments — the `prompt` is the task text sent to the sub-agent and is declared required alongside `agent` in the schema.","triggerScenarios":"Thrown at src/openhuman/agent/tools/delegate.rs:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty `prompt` string describing the task for the sub-agent"],"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-23T08:17:48.524Z"}