{"record":{"id":"7349700c2f2ea458","repo":"tinyhumansai/openhuman","slug":"learning-save-profile-summarisation-failed-e","errorCode":null,"errorMessage":"learning_save_profile: summarisation failed: {e:#}","messagePattern":"learning_save_profile: summarisation failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":541,"sourceCode":"        PermissionLevel::Write\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] save_profile invoked\");\n        let markdown = read_required_str(&args, \"markdown\")?;\n        let summarize = args\n            .get(\"summarize\")\n            .and_then(serde_json::Value::as_bool)\n            .unwrap_or(false);\n        let config = config_rpc::load_config_with_timeout()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_save_profile: {e}\"))?;\n        let body = if summarize {\n            crate::openhuman::agent::learning::linkedin_enrichment::summarise_profile_with_llm(\n                &config, &markdown,\n            )\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_save_profile: summarisation failed: {e:#}\"))?\n        } else {\n            markdown\n        };\n        let path = config.workspace_dir.join(\"PROFILE.md\");\n        if let Some(parent) = path.parent() {\n            tokio::fs::create_dir_all(parent)\n                .await\n                .map_err(|e| anyhow::anyhow!(\"learning_save_profile: create dir failed: {e}\"))?;\n        }\n        tokio::fs::write(&path, &body)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_save_profile: write failed: {e}\"))?;\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"path\": path.display().to_string(),\n            \"bytes\": body.len(),\n        }))?))\n    }\n}","sourceCodeStart":523,"sourceCodeEnd":559,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L523-L559","documentation":"learning_save_profile with summarize=true asked the LLM to summarise the profile markdown first and that inference call failed — provider unreachable, no model configured, or API error. The save stops before writing anything.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:541 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the configured inference provider and API key, then retry","Retry with summarize=false to save the raw markdown now and summarise later","Fall back to writing the unsummarised profile if the provider stays unavailable"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}