{"record":{"id":"a366b7f0961b16ce","repo":"tinyhumansai/openhuman","slug":"memory-chunk-context-memory-driver-does-not-suppo","errorCode":null,"errorMessage":"memory_chunk_context: memory driver does not support the chunk family","messagePattern":"memory_chunk_context: memory driver does not support the chunk family","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/chunk_context.rs","lineNumber":85,"sourceCode":"                \"memory_chunk_context: chunk_id cannot be empty\"\n            ));\n        }\n\n        let window = parsed.window.clamp(1, 5);\n\n        log::debug!(\n            \"[tool][memory_chunk_context] chunk_id={} window={}\",\n            parsed.chunk_id,\n            window,\n        );\n\n        // Chunks are read through the bound driver rather than by opening the\n        // store in this process — see the note in `vector_search.rs`.\n        let guard = active_memory_guard()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_chunk_context: {e}\"))?;\n        let chunk_reader = guard.as_chunks().ok_or_else(|| {\n            anyhow::anyhow!(\"memory_chunk_context: memory driver does not support the chunk family\")\n        })?;\n\n        // Look up the target chunk directly by ID\n        let target = chunk_reader\n            .get_chunk(&parsed.chunk_id)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_chunk_context: get_chunk failed: {e}\"))?\n            .ok_or_else(|| anyhow::anyhow!(\"memory_chunk_context: chunk_id not found\"))?;\n\n        let source_id = target.metadata.source_id.clone();\n        let source_kind = target.metadata.source_kind;\n\n        // Per-profile memory-source gate: if the target chunk belongs to a\n        // source the active profile didn't allow, surface nothing (its window\n        // shares the same source). Non-source chunks always pass.\n        if !tinymemory_core::source_scope::chunk_source_allowed(&target.metadata.tags, &source_id) {\n            return Ok(ToolResult::success(\n                \"Chunk is from a memory source not available to the active agent profile.\",","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/chunk_context.rs#L67-L103","documentation":"The bound driver's as_chunks() is None — chunk context requires the chunk family to fetch the target and its neighbours. Chunks are deliberately read through the bound driver, never by opening the store in-process.","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/chunk_context.rs:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a chunk-capable driver","Check why the active driver lacks MemoryChunks","Fall back to a plain memory search for context"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}