tinyhumansai/openhuman · error
memory_tree: `mode` is required
Error message
memory_tree: `mode` is required
What it means
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.
Source
Thrown at src/openhuman/memory/query/mod.rs:152
"type": "array",
"items": {"type": "string"},
"description": "fetch_leaves: list of chunk ids to pull."
},
// shared
"limit": {
"type": "integer",
"description": "Max results (default varies by mode)."
}
},
"required": ["mode"]
})
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
let mode = args
.get("mode")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow::anyhow!("memory_tree: `mode` is required"))?;
log::debug!("[tool][memory_tree] mode={mode}");
match mode {
"search_entities" => MemoryTreeSearchEntitiesTool.execute(args).await,
"query_source" => MemoryTreeQuerySourceTool.execute(args).await,
"drill_down" => MemoryTreeDrillDownTool.execute(args).await,
"cover_window" => MemoryTreeCoverWindowTool.execute(args).await,
"fetch_leaves" => MemoryTreeFetchLeavesTool.execute(args).await,
"ingest_document" => MemoryTreeIngestDocumentTool.execute(args).await,
"walk" | "smart_walk" => fast_walk::run_fast_walk(args).await,
other => {
log::debug!("[tool][memory_tree] unknown_mode mode={other}");
Err(anyhow::anyhow!(
"memory_tree: unknown mode `{other}`. Valid: search_entities, query_source, drill_down, cover_window, fetch_leaves, ingest_document, walk, smart_walk"
))
}
}
}
}View on GitHub (pinned to 7491200858)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/memory/query/mod.rs:152 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/e2b957aba5012655.
Report an issue: GitHub.