{"record":{"id":"7acf142c5763adae","repo":"tinyhumansai/openhuman","slug":"researcher-graph-finished-without-result","errorCode":null,"errorMessage":"researcher graph finished without result","messagePattern":"researcher graph finished without result","errorType":"exception","errorClass":"SubagentRunError","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/registry/agents/researcher/graph.rs","lineNumber":132,"sourceCode":"async fn run_researcher_graph(\n    request: AgentTurnRequest,\n) -> Result<AgentTurnResult, SubagentRunError> {\n    let label = format!(\"agent:researcher:{}\", request.task_id);\n    let graph = build_researcher_graph()\n        .map_err(|err| SubagentRunError::Provider(anyhow::anyhow!(err)))?\n        .with_event_sink(Arc::new(\n            crate::openhuman::agent::tinyagents::observability::GraphTracingSink::new(label),\n        ));\n    let execution = graph\n        .run(ResearcherGraphState::with_request(request))\n        .await\n        .map_err(|err| SubagentRunError::Provider(anyhow::anyhow!(err)))?;\n    tracing::debug!(\n        visited = ?execution.state.visited,\n        \"[researcher_graph] completed custom researcher topology\"\n    );\n    let result = execution.state.result.lock().await.take().ok_or_else(|| {\n        SubagentRunError::Provider(anyhow::anyhow!(\"researcher graph finished without result\"))\n    })?;\n    result.map_err(|err| SubagentRunError::Provider(anyhow::anyhow!(err)))\n}\n\nfn run(\n    request: AgentTurnRequest,\n) -> Pin<Box<dyn Future<Output = Result<AgentTurnResult, SubagentRunError>> + Send>> {\n    Box::pin(run_researcher_graph(request))\n}\n\npub fn graph() -> AgentGraph {\n    AgentGraph::custom(run)\n}\n\npub(crate) fn topology() -> Result<GraphTopology, String> {\n    Ok(build_researcher_graph()?.topology())\n}\n","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/registry/agents/researcher/graph.rs#L114-L150","documentation":"The researcher sub-agent's graph reached its finish node without producing a result — the terminal state lacks the AgentTurnResult the caller expects. A structural invariant violation of the researcher graph's control flow (a path to 'done' that skips result production), converted to an error rather than unwrapping a None. Distinct from provider errors, which map to SubagentRunError::Provider separately.","triggerScenarios":"Thrown at src/openhuman/agent/registry/agents/researcher/graph.rs:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the researcher graph's nodes/edges for a finish path that bypasses result assembly","Fix the graph so every terminal path sets the result state before 'done'","Add a unit test running the researcher graph to completion to pin the invariant"],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}