tinyhumansai/openhuman · error

learning_save_profile

Error message

learning_save_profile: {e}

What it means

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.

Solutions

  1. Retry after the concurrent config operation (another RPC writing config) completes
  2. Check workspace/config.toml health if loading persistently times out
  3. Save the markdown outside the tool and retry later if config stays wedged
Defensive patterns

Strategy: retry

When it happens

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

Appendix: source

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

            },
            "required": ["markdown"]
        })
    }

    fn permission_level(&self) -> PermissionLevel {
        PermissionLevel::Write
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][learning] save_profile invoked");
        let markdown = read_required_str(&args, "markdown")?;
        let summarize = args
            .get("summarize")
            .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}"))?;

View on GitHub (pinned to 7491200858)