tinyhumansai/openhuman · error · anyhow::Error

memory_chunk_context: get_chunk failed: {e}

Error message

memory_chunk_context: get_chunk failed: {e}

What it means

Capability guard in the memory_chunk_context tool's execute: guard.as_chunks() returned None, meaning the active memory driver does not implement the chunk family, so chunk context cannot be read. Driver-capability boundary, not bad input — the get_chunk call is never attempted.

Source

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

            "[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) {
            return Ok(ToolResult::success(
                "Chunk is from a memory source not available to the active agent profile.",
            ));
        }

        // Get all chunks from the same source, ordered by timestamp. The
        // source-scope gate also applies here (the target was already checked
        // above; this keeps the window consistent). None = unrestricted.
        let source_query = ChunkQuery {

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry transient driver failures
  2. Verify the chunk id came from a fresh search (it may have been dropped)
  3. Inspect the chained error for the underlying fault
Defensive patterns

Strategy: retry

When it happens

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