tinyhumansai/openhuman · error

learning_save_profile: create dir failed

Error message

learning_save_profile: create dir failed: {e}

What it means

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.

Solutions

  1. Check workspace_dir permissions and that the path is writable
  2. Fix any invalid workspace_dir configuration and retry
  3. Free disk space / remount read-only filesystems writable if that is the cause
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/learning/tools.rs:549 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/12259cbc417c6546. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/learning/tools.rs:549

            .and_then(serde_json::Value::as_bool)
            .unwrap_or(false);
        let config = config_rpc::load_config_with_timeout()
            .await
            .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"

View on GitHub (pinned to 7491200858)