{"record":{"id":"cc6f36fc39c08c15","repo":"tinyhumansai/openhuman","slug":"learning-enrich-profile-e","errorCode":null,"errorMessage":"learning_enrich_profile: {e}","messagePattern":"learning_enrich_profile: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":597,"sourceCode":"    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Execute\n    }\n\n    fn external_effect(&self) -> bool {\n        true\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] enrich_profile invoked\");\n        let preset = args\n            .get(\"profile_url\")\n            .and_then(serde_json::Value::as_str)\n            .map(str::to_string);\n        let config = config_rpc::load_config_with_timeout()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_enrich_profile: {e}\"))?;\n        let result =\n            crate::openhuman::agent::learning::linkedin_enrichment::run_linkedin_enrichment(\n                &config, preset,\n            )\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_enrich_profile: {e:#}\"))?;\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"profile_url\": result.profile_url,\n            \"profile_data\": result.profile_data,\n            \"stages\": result.stages,\n            \"log\": result.log,\n        }))?))\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;","sourceCodeStart":579,"sourceCodeEnd":615,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/openhuman/agent/learning/tools.rs#L579-L615","documentation":"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.","triggerScenarios":"Invalid config.toml after a manual edit; config load timeout under filesystem contention; missing/unreadable workspace config path; bad env overrides.","commonSituations":"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.","solutions":["Fix config.toml (validate by loading config via RPC or restarting the core and reading the startup error)","Retry after clearing filesystem contention","Verify workspace_dir and env overrides resolve correctly"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Same pre-flight as save_profile: any config RPC read exercising load_config:\n// config.get -> if this fails, fix config.toml before calling learning_enrich_profile","typeGuard":null,"tryCatchPattern":"match tool_exec(\"learning_enrich_profile\", args).await {\n    Err(e) if e.to_string().contains(\"learning_enrich_profile:\") && !e.to_string().contains(\"run\") => {\n        // config-load failure — nothing external was attempted; fix config, retry\n        Err(e)\n    }\n    other => other,\n}","preventionTips":["Enrichment is expensive and external — always confirm config health first so you don't burn a retry budget on config errors","Keep config.toml edits validated"],"tags":["rust","config","toml","learning","timeout"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}