tinyhumansai/openhuman · error

invalid arguments for memory_tree_search_entities: {e}

Error message

invalid arguments for memory_tree_search_entities: {e}

What it means

Argument-deserialization wrapper in the memory_tree_search_entities tool's execute: args failed to deserialize into the search request (e.g. `query` missing or non-string — the schema requires query, with optional kinds filter and limit). Generic sentinel; the serde message in `{e}` names the offending field.

Source

Thrown at src/openhuman/memory/query/search_entities.rs:57

                            "misc", "topic"
                        ]
                    },
                    "description": "Optional kind filter — restrict to these entity kinds only."
                },
                "limit": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Max matches (default 5, clamped to 100)."
                }
            },
            "required": ["query"]
        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][memory_tree] search_entities invoked");
        let req: SearchEntitiesRequest = serde_json::from_value(args).map_err(|e| {
            anyhow::anyhow!("invalid arguments for memory_tree_search_entities: {e}")
        })?;
        // `kinds` is **not** validated here any more, and that is a deliberate
        // move rather than an omission.
        //
        // Entity kinds are an open vocabulary on the wire (see
        // `memory::api::provider::retrieval`): the engine's own `EntityKind` is
        // `#[non_exhaustive]` and has grown twice, so a closed host-side copy
        // would either reject a kind the engine understands or drift silently
        // out of date. The driver owns the vocabulary and rejects an unknown
        // kind with `Invalid`.
        //
        // The cost is real and worth naming: a bad `kinds` value used to fail
        // without a workspace, and now needs a bound driver to fail. The
        // alternative — duplicating an open vocabulary host-side — is the
        // failure mode this contract was shaped to avoid.
        let limit = req.limit.unwrap_or(5).min(100);
        let guard = active_memory_guard()
            .await

View on GitHub (pinned to 7491200858)

Solutions

  1. Include a non-empty "query" string
  2. Check limit/kinds field types against the schema
  3. Remove unknown fields
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/query/search_entities.rs:57 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/e59a5632a095b11d. Report an issue: GitHub.