tinyhumansai/openhuman · error
learning_save_profile: write failed
Error message
learning_save_profile: write failed: {e} What it means
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.
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/agent/learning/tools.rs:553 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/ed2aeccdd2168873.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/learning/tools.rs:553
.map_err(|e| anyhow::anyhow!("learning_save_profile: {e}"))?;
let body = if summarize {
crate::openhuman::agent::learning::linkedin_enrichment::summarise_profile_with_llm(
&config, &markdown,
)
.await
.map_err(|e| anyhow::anyhow!("learning_save_profile: summarisation failed: {e:#}"))?
} else {
markdown
};
let path = config.workspace_dir.join("PROFILE.md");
if let Some(parent) = path.parent() {
tokio::fs::create_dir_all(parent)
.await
.map_err(|e| anyhow::anyhow!("learning_save_profile: create dir failed: {e}"))?;
}
tokio::fs::write(&path, &body)
.await
.map_err(|e| anyhow::anyhow!("learning_save_profile: write failed: {e}"))?;
Ok(ToolResult::success(serde_json::to_string(&json!({
"path": path.display().to_string(),
"bytes": body.len(),
}))?))
}
}
/// Enrich the profile via LinkedIn (external scrape). Default-OFF.
pub struct LearningEnrichProfileTool;
#[async_trait]
impl Tool for LearningEnrichProfileTool {
fn name(&self) -> &str {
"learning_enrich_profile"
}
fn description(&self) -> &str {
"Run the LinkedIn profile-enrichment pipeline: optionally with a preset \View on GitHub (pinned to 7491200858)