tinyhumansai/openhuman · error · SubagentRunError

researcher graph finished without result

Error message

researcher graph finished without result

What it means

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.

Source

Thrown at src/openhuman/agent/registry/agents/researcher/graph.rs:132

async fn run_researcher_graph(
    request: AgentTurnRequest,
) -> Result<AgentTurnResult, SubagentRunError> {
    let label = format!("agent:researcher:{}", request.task_id);
    let graph = build_researcher_graph()
        .map_err(|err| SubagentRunError::Provider(anyhow::anyhow!(err)))?
        .with_event_sink(Arc::new(
            crate::openhuman::agent::tinyagents::observability::GraphTracingSink::new(label),
        ));
    let execution = graph
        .run(ResearcherGraphState::with_request(request))
        .await
        .map_err(|err| SubagentRunError::Provider(anyhow::anyhow!(err)))?;
    tracing::debug!(
        visited = ?execution.state.visited,
        "[researcher_graph] completed custom researcher topology"
    );
    let result = execution.state.result.lock().await.take().ok_or_else(|| {
        SubagentRunError::Provider(anyhow::anyhow!("researcher graph finished without result"))
    })?;
    result.map_err(|err| SubagentRunError::Provider(anyhow::anyhow!(err)))
}

fn run(
    request: AgentTurnRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentTurnResult, SubagentRunError>> + Send>> {
    Box::pin(run_researcher_graph(request))
}

pub fn graph() -> AgentGraph {
    AgentGraph::custom(run)
}

pub(crate) fn topology() -> Result<GraphTopology, String> {
    Ok(build_researcher_graph()?.topology())
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Inspect the researcher graph's nodes/edges for a finish path that bypasses result assembly
  2. Fix the graph so every terminal path sets the result state before 'done'
  3. Add a unit test running the researcher graph to completion to pin the invariant
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/agent/registry/agents/researcher/graph.rs:132 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/7acf142c5763adae. Report an issue: GitHub.