{"record":{"id":"9272f5135678e85f","repo":"tinyhumansai/openhuman","slug":"memory-chunk-context-chunk-id-cannot-be-empty","errorCode":null,"errorMessage":"memory_chunk_context: chunk_id cannot be empty","messagePattern":"memory_chunk_context: chunk_id cannot be empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/chunk_context.rs","lineNumber":66,"sourceCode":"                    \"type\": \"string\",\n                    \"description\": \"ID of the chunk to retrieve context for (from a prior search result).\"\n                },\n                \"window\": {\n                    \"type\": \"integer\",\n                    \"minimum\": 1,\n                    \"maximum\": 5,\n                    \"description\": \"Number of neighboring chunks to include before and after (default 2).\"\n                }\n            }\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let parsed: Args = serde_json::from_value(args)\n            .map_err(|e| anyhow::anyhow!(\"invalid arguments for memory_chunk_context: {e}\"))?;\n\n        if parsed.chunk_id.trim().is_empty() {\n            return Err(anyhow::anyhow!(\n                \"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(|| {","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/chunk_context.rs#L48-L84","documentation":"The parsed chunk_id trims to empty — a blank id cannot reference any chunk, so the tool refuses before touching the driver. Distinct from a well-formed id that matches nothing (that is chunk_id not found).","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/chunk_context.rs:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the non-empty chunk id from a prior search","Avoid placeholder or whitespace ids"],"exampleFix":null,"handlingStrategy":"validation","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-14T00:17:10.932Z"}