tinyhumansai/openhuman · error · anyhow::Error

memory_chunk_context: {e}

Error message

memory_chunk_context: {e}

What it means

Error-surfacing wrapper in the memory_chunk_context tool's execute: active_memory_guard() failed (no memory driver bound) after arguments were validated and window clamped to 1–5. Fires before the chunk lookup; an environment/driver problem rather than bad input.

Source

Thrown at src/openhuman/memory/tools/search/chunk_context.rs:83

        if parsed.chunk_id.trim().is_empty() {
            return Err(anyhow::anyhow!(
                "memory_chunk_context: chunk_id cannot be empty"
            ));
        }

        let window = parsed.window.clamp(1, 5);

        log::debug!(
            "[tool][memory_chunk_context] chunk_id={} window={}",
            parsed.chunk_id,
            window,
        );

        // Chunks are read through the bound driver rather than by opening the
        // store in this process — see the note in `vector_search.rs`.
        let guard = active_memory_guard()
            .await
            .map_err(|e| anyhow::anyhow!("memory_chunk_context: {e}"))?;
        let chunk_reader = guard.as_chunks().ok_or_else(|| {
            anyhow::anyhow!("memory_chunk_context: memory driver does not support the chunk family")
        })?;

        // Look up the target chunk directly by ID
        let target = chunk_reader
            .get_chunk(&parsed.chunk_id)
            .await
            .map_err(|e| anyhow::anyhow!("memory_chunk_context: get_chunk failed: {e}"))?
            .ok_or_else(|| anyhow::anyhow!("memory_chunk_context: chunk_id not found"))?;

        let source_id = target.metadata.source_id.clone();
        let source_kind = target.metadata.source_kind;

        // Per-profile memory-source gate: if the target chunk belongs to a
        // source the active profile didn't allow, surface nothing (its window
        // shares the same source). Non-source chunks always pass.
        if !tinymemory_core::source_scope::chunk_source_allowed(&target.metadata.tags, &source_id) {

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry after driver binding
  2. Inspect the chained binding error
  3. Confirm a chunk-capable memory backend is active
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/openhuman/memory/tools/search/chunk_context.rs:83 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/6db1b8b2280ede2e. Report an issue: GitHub.