{"record":{"id":"6585fbc6f7f7e841","repo":"tinyhumansai/openhuman","slug":"learning-save-profile-e","errorCode":null,"errorMessage":"learning_save_profile: {e}","messagePattern":"learning_save_profile: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":535,"sourceCode":"            },\n            \"required\": [\"markdown\"]\n        })\n    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Write\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] save_profile invoked\");\n        let markdown = read_required_str(&args, \"markdown\")?;\n        let summarize = args\n            .get(\"summarize\")\n            .and_then(serde_json::Value::as_bool)\n            .unwrap_or(false);\n        let config = config_rpc::load_config_with_timeout()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_save_profile: {e}\"))?;\n        let body = if summarize {\n            crate::openhuman::agent::learning::linkedin_enrichment::summarise_profile_with_llm(\n                &config, &markdown,\n            )\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_save_profile: summarisation failed: {e:#}\"))?\n        } else {\n            markdown\n        };\n        let path = config.workspace_dir.join(\"PROFILE.md\");\n        if let Some(parent) = path.parent() {\n            tokio::fs::create_dir_all(parent)\n                .await\n                .map_err(|e| anyhow::anyhow!(\"learning_save_profile: create dir failed: {e}\"))?;\n        }\n        tokio::fs::write(&path, &body)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_save_profile: write failed: {e}\"))?;","sourceCodeStart":517,"sourceCodeEnd":553,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L517-L553","documentation":"learning_save_profile could not load the Config (load_config_with_timeout) before writing PROFILE.md — typically a config lock contention/timeout or a workspace resolution failure. The save aborts before summarisation or any file write.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:535 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after the concurrent config operation (another RPC writing config) completes","Check workspace/config.toml health if loading persistently times out","Save the markdown outside the tool and retry later if config stays wedged"],"exampleFix":null,"handlingStrategy":"retry","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"}