{"record":{"id":"12259cbc417c6546","repo":"tinyhumansai/openhuman","slug":"learning-save-profile-create-dir-failed-e","errorCode":null,"errorMessage":"learning_save_profile: create dir failed: {e}","messagePattern":"learning_save_profile: create dir failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":549,"sourceCode":"            .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}\"))?;\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\"","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L531-L567","documentation":"Before writing PROFILE.md, the tool creates the workspace directory with tokio::fs::create_dir_all and that failed — permissions, an invalid/read-only workspace path, or disk error. No file was written.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:549 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check workspace_dir permissions and that the path is writable","Fix any invalid workspace_dir configuration and retry","Free disk space / remount read-only filesystems writable if that is the cause"],"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"}