{"record":{"id":"77e9c54b584289b6","repo":"tinyhumansai/openhuman","slug":"learning-reset-cache-e","errorCode":null,"errorMessage":"learning_reset_cache: {e:#}","messagePattern":"learning_reset_cache: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":488,"sourceCode":"         only user-pinned facets. Irreversible. Only use when the user wants to \\\n         wipe the assistant's learned model of them.\"\n    }\n\n    fn parameters_schema(&self) -> serde_json::Value {\n        json!({ \"type\": \"object\", \"properties\": {} })\n    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Dangerous\n    }\n\n    async fn execute(&self, _args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] reset_cache invoked\");\n        let cache = get_cache().await?;\n        let (deleted, pinned_preserved) =\n            crate::openhuman::agent::learning::cache::reset_non_pinned(&cache)\n                .await\n                .map_err(|e| anyhow::anyhow!(\"learning_reset_cache: {e:#}\"))?;\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"deleted\": deleted,\n            \"pinned_preserved\": pinned_preserved,\n        }))?))\n    }\n}\n\n/// Write PROFILE.md from supplied markdown. Default-OFF.\npub struct LearningSaveProfileTool;\n\n#[async_trait]\nimpl Tool for LearningSaveProfileTool {\n    fn name(&self) -> &str {\n        \"learning_save_profile\"\n    }\n\n    fn description(&self) -> &str {\n        \"Write the supplied `markdown` to PROFILE.md in the workspace (the \\","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L470-L506","documentation":"learning_reset_cache (Dangerous permission) failed while deleting non-pinned facets via the module's reset path. The reset is irreversible by design; this error means the wipe did not fully complete and some learned state may remain.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:488 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the reset — already-deleted facets are gone and skipped on rerun","Check the underlying memory driver error for the real failure","Verify with learning_cache_stats that only pinned facets remain afterwards"],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}