{"record":{"id":"e2b957aba5012655","repo":"tinyhumansai/openhuman","slug":"memory-tree-mode-is-required","errorCode":null,"errorMessage":"memory_tree: `mode` is required","messagePattern":"memory_tree: `mode` is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/query/mod.rs","lineNumber":152,"sourceCode":"                    \"type\": \"array\",\n                    \"items\": {\"type\": \"string\"},\n                    \"description\": \"fetch_leaves: list of chunk ids to pull.\"\n                },\n                // shared\n                \"limit\": {\n                    \"type\": \"integer\",\n                    \"description\": \"Max results (default varies by mode).\"\n                }\n            },\n            \"required\": [\"mode\"]\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let mode = args\n            .get(\"mode\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"memory_tree: `mode` is required\"))?;\n        log::debug!(\"[tool][memory_tree] mode={mode}\");\n        match mode {\n            \"search_entities\" => MemoryTreeSearchEntitiesTool.execute(args).await,\n            \"query_source\" => MemoryTreeQuerySourceTool.execute(args).await,\n            \"drill_down\" => MemoryTreeDrillDownTool.execute(args).await,\n            \"cover_window\" => MemoryTreeCoverWindowTool.execute(args).await,\n            \"fetch_leaves\" => MemoryTreeFetchLeavesTool.execute(args).await,\n            \"ingest_document\" => MemoryTreeIngestDocumentTool.execute(args).await,\n            \"walk\" | \"smart_walk\" => fast_walk::run_fast_walk(args).await,\n            other => {\n                log::debug!(\"[tool][memory_tree] unknown_mode mode={other}\");\n                Err(anyhow::anyhow!(\n                    \"memory_tree: unknown mode `{other}`. Valid: search_entities, query_source, drill_down, cover_window, fetch_leaves, ingest_document, walk, smart_walk\"\n                ))\n            }\n        }\n    }\n}","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/query/mod.rs#L134-L170","documentation":"The memory_tree dispatcher found no \"mode\" string in the args. mode selects which sub-tool (search_entities, query_source, drill_down, ...) handles the call; it is the single required field of the union schema.","triggerScenarios":"Thrown at src/openhuman/memory/query/mod.rs:152 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass one of the documented mode strings (e.g. walk, drill_down, fetch_leaves)","Check the tool call was not truncated before the mode field"],"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"}