{"record":{"id":"cb3e25cf64ac9382","repo":"tinyhumansai/openhuman","slug":"call-memory-agent-query-is-required","errorCode":null,"errorMessage":"call_memory_agent: `query` is required","messagePattern":"call_memory_agent: `query` is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/agent/tools.rs","lineNumber":112,"sourceCode":"    fn is_concurrency_safe(&self, _args: &serde_json::Value) -> bool {\n        true\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        self.execute_with_context(args, ToolCallOptions::default(), None)\n            .await\n    }\n\n    async fn execute_with_context(\n        &self,\n        args: serde_json::Value,\n        _options: ToolCallOptions,\n        tool_context: Option<&ToolExecutionContext>,\n    ) -> anyhow::Result<ToolResult> {\n        let query = args\n            .get(\"query\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"call_memory_agent: `query` is required\"))?;\n\n        let context = args.get(\"context\").and_then(|v| v.as_str());\n\n        let max_turns = args\n            .get(\"max_turns\")\n            .and_then(|v| v.as_u64())\n            .map(|v| v.clamp(1, 20) as usize);\n\n        let is_async = args.get(\"async\").and_then(|v| v.as_bool()).unwrap_or(false);\n\n        let parent = current_parent();\n        if parent.is_none() {\n            return Ok(ToolResult::error(\n                \"call_memory_agent: no parent agent context — this tool must be \\\n                 called from within an agent turn.\"\n                    .to_string(),\n            ));\n        }","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/agent/tools.rs#L94-L130","documentation":"call_memory_agent's execute_with_context found no \"query\" string in the tool args. The sub-agent dispatch cannot start without a natural-language brief, so this guard fires before any registry or context lookup.","triggerScenarios":"Thrown at src/openhuman/memory/agent/tools.rs:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include a non-empty \"query\" string describing what the memory agent should do","Check the tool call was not truncated, dropping trailing 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-14T05:17:10.506Z"}