tinyhumansai/openhuman · error

memory_tree_search_entities

Error message

memory_tree_search_entities: {e}

What it means

Wrapper around active_memory_guard() in search_entities: driver acquisition failed. Notably kinds validation is deferred to the driver (open vocabulary), so this path is about the guard itself, not entity-kind arguments.

Solutions

  1. Retry once the memory subsystem has bound
  2. Check the chained error for the binding failure cause
  3. Verify the memory driver configuration
Defensive patterns

Strategy: retry

When it happens

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

Appendix: source

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

        })?;
        // `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
            .map_err(|e| anyhow::anyhow!("memory_tree_search_entities: {e}"))?;
        let matches = guard
            .as_retrieval()
            .ok_or_else(|| {
                anyhow::anyhow!(
                    "memory_tree_search_entities: memory driver does not support the \
                     retrieval family"
                )
            })?
            .search_entities(&req.query, req.kinds.as_deref(), limit)
            .await
            .map_err(|e| anyhow::anyhow!("memory_tree_search_entities: {e}"))?;
        log::debug!(
            "[tool][memory_tree] search_entities returning matches={}",
            matches.len()
        );
        let json = serde_json::to_string(&matches)?;
        Ok(ToolResult::success(json))
    }

View on GitHub (pinned to 7491200858)