tinyhumansai/openhuman · error · anyhow::Error

Missing 'prompt' parameter

Error message

Missing 'prompt' parameter

What it means

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.

Solutions

  1. Provide a non-empty `prompt` string describing the task for the sub-agent
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/agent/tools/delegate.rs:136 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/8d92bc92dfa8111f. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/tools/delegate.rs:136

        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        let agent_name = args
            .get("agent")
            .and_then(|v| v.as_str())
            .map(str::trim)
            .ok_or_else(|| anyhow::anyhow!("Missing 'agent' parameter"))?;

        if agent_name.is_empty() {
            return Ok(ToolResult::error("'agent' parameter must not be empty"));
        }

        let prompt = args
            .get("prompt")
            .and_then(|v| v.as_str())
            .map(str::trim)
            .ok_or_else(|| anyhow::anyhow!("Missing 'prompt' parameter"))?;

        if prompt.is_empty() {
            return Ok(ToolResult::error("'prompt' parameter must not be empty"));
        }

        let context = args
            .get("context")
            .and_then(|v| v.as_str())
            .map(str::trim)
            .unwrap_or("");

        // Look up agent config
        let agent_config = match self.agents.get(agent_name) {
            Some(cfg) => cfg,
            None => {
                let available: Vec<&str> =
                    self.agents.keys().map(|s: &String| s.as_str()).collect();
                return Ok(ToolResult::error(format!(

View on GitHub (pinned to 7491200858)