{"record":{"id":"61f6448ecd3af8bd","repo":"tinyhumansai/openhuman","slug":"tool-stats-memory-unavailable-e","errorCode":null,"errorMessage":"tool_stats: memory unavailable: {e}","messagePattern":"tool_stats: memory unavailable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/tool_stats.rs","lineNumber":62,"sourceCode":"                }\n            }\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let filter = args\n            .get(\"tool_name\")\n            .and_then(|v| v.as_str())\n            .map(|s| s.to_string());\n\n        log::debug!(\n            \"[tool_stats] executing query filter={:?}\",\n            filter.as_deref()\n        );\n\n        let guard = active_memory_guard()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"tool_stats: memory unavailable: {e}\"))?;\n        let entries = guard\n            .list(\n                Some(\"tool_effectiveness\"),\n                Some(&MemoryCategory::Custom(\"tool_effectiveness\".into())),\n                None,\n            )\n            .await?;\n\n        log::debug!(\n            \"[tool_stats] found {} tool effectiveness entries\",\n            entries.len()\n        );\n\n        if entries.is_empty() {\n            log::debug!(\"[tool_stats] no entries, returning early\");\n            return Ok(ToolResult::success(\n                \"No tool effectiveness data recorded yet.\",\n            ));","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/tool_stats.rs#L44-L80","documentation":"tool_stats queries the in-process memory engine for recorded tool usage; this fires when acquiring the active-memory guard fails — the memory subsystem/module is not available in this build or runtime — so stats cannot be served. It is an infrastructure unavailability, not a bad query.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/tool_stats.rs:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the memory module/engine is enabled and initialized in this build","Retry once startup has completed if the memory subsystem was still booting"],"exampleFix":null,"handlingStrategy":"fallback","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"}