tinyhumansai/openhuman · error · anyhow::Error
memory_chunk_context: chunk_id not found
Error message
memory_chunk_context: chunk_id not found
What it means
Not-found result in the memory_chunk_context tool's execute: the direct get_chunk lookup by the supplied chunk_id returned nothing, so the chunk does not exist (or is invisible to this driver). Fired after guard and chunk-family checks passed; the caller should pass a chunk_id taken from a prior search result.
Source
Thrown at src/openhuman/memory/tools/search/chunk_context.rs:93
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 {
source_kind: Some(source_kind),View on GitHub (pinned to 7491200858)
Solutions
- Re-run the originating search to get a fresh chunk id with source metadata
- Retry — partially-written chunks can lack source linkage temporarily
- Report if consistent: the store has an orphaned chunk row
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/memory/tools/search/chunk_context.rs:93 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/f1a1076262800dc1.
Report an issue: GitHub.