{"record":{"id":"818a23f1f0064138","repo":"tinyhumansai/openhuman","slug":"invalid-arguments-for-memory-chunk-context-e","errorCode":null,"errorMessage":"invalid arguments for memory_chunk_context: {e}","messagePattern":"invalid arguments for memory_chunk_context: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/chunk_context.rs","lineNumber":63,"sourceCode":"            \"required\": [\"chunk_id\"],\n            \"properties\": {\n                \"chunk_id\": {\n                    \"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()","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/chunk_context.rs#L45-L81","documentation":"Argument-deserialization wrapper in the memory_chunk_context tool's execute: args failed to deserialize into the tool's Args struct (e.g. `chunk_id` missing/non-string, or `window` not an integer within the declared 1–5). Generic sentinel; the serde message in `{e}` names the field at fault.","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/chunk_context.rs:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass chunk_id as a string from a prior search result","Keep window between 1 and 5","Fix malformed JSON in the arguments"],"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"}