{"record":{"id":"ed2aeccdd2168873","repo":"tinyhumansai/openhuman","slug":"learning-save-profile-write-failed-e","errorCode":null,"errorMessage":"learning_save_profile: write failed: {e}","messagePattern":"learning_save_profile: write failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":553,"sourceCode":"            .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}\"))?;\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"path\": path.display().to_string(),\n            \"bytes\": body.len(),\n        }))?))\n    }\n}\n\n/// Enrich the profile via LinkedIn (external scrape). Default-OFF.\npub struct LearningEnrichProfileTool;\n\n#[async_trait]\nimpl Tool for LearningEnrichProfileTool {\n    fn name(&self) -> &str {\n        \"learning_enrich_profile\"\n    }\n\n    fn description(&self) -> &str {\n        \"Run the LinkedIn profile-enrichment pipeline: optionally with a preset \\","sourceCodeStart":535,"sourceCodeEnd":571,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L535-L571","documentation":"The final tokio::fs::write of PROFILE.md into the workspace failed after summarisation and directory creation succeeded — typically disk full, permissions changed, or the path becoming invalid mid-write. The profile body was produced but not persisted.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:553 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the save_profile call (summarisation will rerun or can be skipped)","Check disk space and write permissions on workspace_dir","Return the failure to the model so it can inform the user instead of assuming success"],"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"}