tinyhumansai/openhuman · error

learning_enrich_profile: {e}

Error message

learning_enrich_profile: {e}

What it means

Thrown by learning_enrich_profile when config_rpc::load_config_with_timeout() fails before the enrichment pipeline can run. Identical failure family to the save_profile config error: the TOML Config could not be loaded (unreadable/invalid) or the bounded load timed out; the enrichment needs the Config both for the integration client and to resolve workspace_dir/PROFILE.md output.

Source

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

    }

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

    fn external_effect(&self) -> bool {
        true
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][learning] enrich_profile invoked");
        let preset = args
            .get("profile_url")
            .and_then(serde_json::Value::as_str)
            .map(str::to_string);
        let config = config_rpc::load_config_with_timeout()
            .await
            .map_err(|e| anyhow::anyhow!("learning_enrich_profile: {e}"))?;
        let result =
            crate::openhuman::agent::learning::linkedin_enrichment::run_linkedin_enrichment(
                &config, preset,
            )
            .await
            .map_err(|e| anyhow::anyhow!("learning_enrich_profile: {e:#}"))?;
        Ok(ToolResult::success(serde_json::to_string(&json!({
            "profile_url": result.profile_url,
            "profile_data": result.profile_data,
            "stages": result.stages,
            "log": result.log,
        }))?))
    }
}

#[cfg(test)]
mod tests {
    use super::*;

View on GitHub (pinned to a221052e0d)

Solutions

  1. Fix config.toml (validate by loading config via RPC or restarting the core and reading the startup error)
  2. Retry after clearing filesystem contention
  3. Verify workspace_dir and env overrides resolve correctly
Defensive patterns

Strategy: retry

Validate before calling

// Same pre-flight as save_profile: any config RPC read exercising load_config:
// config.get -> if this fails, fix config.toml before calling learning_enrich_profile

Try / catch

match tool_exec("learning_enrich_profile", args).await {
    Err(e) if e.to_string().contains("learning_enrich_profile:") && !e.to_string().contains("run") => {
        // config-load failure — nothing external was attempted; fix config, retry
        Err(e)
    }
    other => other,
}

Prevention

When it happens

Trigger: Invalid config.toml after a manual edit; config load timeout under filesystem contention; missing/unreadable workspace config path; bad env overrides.

Common situations: Config broken by a settings change via UI that wrote an invalid value; first run on a new machine; asking for LinkedIn enrichment right after a failed config migration.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/cc6f36fc39c08c15. Report an issue: GitHub.