tinyhumansai/openhuman · error · anyhow::Error

invalid arguments for memory_hybrid_search: {e}

Error message

invalid arguments for memory_hybrid_search: {e}

What it means

Argument-deserialization wrapper in the memory_hybrid_search tool's execute: args failed to deserialize into the tool's Args struct (bad types for query/profile/limit/include_breakdown — e.g. limit outside the declared 1–50 is rejected later, but a non-integer fails here). Generic sentinel with the serde detail in `{e}`.

Source

Thrown at src/openhuman/memory/tools/search/hybrid_search.rs:98

                    "description": "Weight profile: 'balanced' (default), 'semantic' (vector-heavy), 'lexical' (keyword-heavy), 'graph_first' (relationship-heavy)."
                },
                "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "description": "Max results (default 10)."
                },
                "include_breakdown": {
                    "type": "boolean",
                    "description": "Show per-signal score breakdown for each result (default false)."
                }
            }
        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        let parsed: Args = serde_json::from_value(args)
            .map_err(|e| anyhow::anyhow!("invalid arguments for memory_hybrid_search: {e}"))?;

        if parsed.query.trim().is_empty() {
            return Err(anyhow::anyhow!(
                "memory_hybrid_search: query cannot be empty"
            ));
        }
        if parsed.namespace.trim().is_empty() {
            return Err(anyhow::anyhow!(
                "memory_hybrid_search: namespace cannot be empty"
            ));
        }

        let profile = WeightProfile::by_name(&parsed.mode).ok_or_else(|| {
            log::warn!(
                "[tool][memory_hybrid_search] rejected unknown mode={}",
                parsed.mode
            );
            anyhow::anyhow!(

View on GitHub (pinned to 7491200858)

Solutions

  1. Include query and namespace strings
  2. Use mode values balanced/semantic/lexical/graph_first and limit 1-50
  3. Fix malformed JSON
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/tools/search/hybrid_search.rs:98 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/af2a958e77bd0435. Report an issue: GitHub.