tinyhumansai/openhuman · error

memory_tree walk: `query` is required

Error message

memory_tree walk: `query` is required

What it means

The memory_tree walk entry point found no "query" string in the args. run_fast_walk requires a natural-language query to drive the E2GraphRAG deterministic retriever; this guard fires before limit/hops parsing.

Source

Thrown at src/openhuman/memory/query/fast_walk.rs:21

//!
//! Both modes now resolve to [`fast_retrieve`] — the E2GraphRAG, LLM-free
//! retriever. It returns a structured [`QueryResponse`] of ranked evidence
//! (no synthesized prose); a higher-level context agent composes the answer.

use crate::openhuman::memory::api::provider::{FastRetrieveQuery, MemoryProvider};
use crate::openhuman::memory::ops::guard::active_memory_guard;
use crate::openhuman::tools::traits::ToolResult;

/// Parse the shared `memory_tree` args and run deterministic retrieval.
/// Accepts `query` (required), `limit`, `time_window_days`, and `max_hops`.
pub async fn run_fast_walk(args: serde_json::Value) -> anyhow::Result<ToolResult> {
    let query = args
        .get("query")
        .and_then(|v| v.as_str())
        .unwrap_or("")
        .to_string();
    if query.trim().is_empty() {
        return Err(anyhow::anyhow!("memory_tree walk: `query` is required"));
    }

    let limit = args
        .get("limit")
        .and_then(|v| v.as_u64())
        .map(|n| n as usize)
        .unwrap_or(10);
    let time_window_days = args
        .get("time_window_days")
        .and_then(|v| v.as_u64())
        .map(|n| n as u32);
    let max_hops = args
        .get("max_hops")
        .and_then(|v| v.as_u64())
        .map(|n| n as u32)
        .unwrap_or(2);

    log::debug!(

View on GitHub (pinned to 7491200858)

Solutions

  1. Pass a non-empty "query" string describing what to retrieve
  2. Check the tool call did not drop fields mid-serialization
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/query/fast_walk.rs:21 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/cc68384371827732. Report an issue: GitHub.