tinyhumansai/openhuman · error

worker snapshot missing after wait

Error message

worker snapshot missing after wait

What it means

After wait_agents returned, the worker's snapshot could not be extracted from the wait result — the invariant that a completed wait yields a worker snapshot is violated. Defensive guard against a harness API change or partial result; the member's outcome is unknowable from this response, so the run errors out rather than guessing success/failure.

Source

Thrown at src/openhuman/agent/orchestration/agent_teams/runtime.rs:300

                        .collect(),
                        ..Default::default()
                    })
                    .await
                    .map_err(|e| anyhow!("spawn teammate worker failed: {e}"))?;

                let wait = session
                    .wait_agents(WaitAgentOptions {
                        orchestration_ids: vec![resp.orchestration_id.clone()],
                        timeout_ms: None,
                    })
                    .await
                    .map_err(|e| anyhow!("wait teammate worker failed: {e}"))?;

                let snapshot = wait
                    .agents
                    .into_iter()
                    .find(|a| a.orchestration_id == resp.orchestration_id)
                    .ok_or_else(|| anyhow!("worker snapshot missing after wait"))?;

                Ok(match snapshot.status {
                    AgentStatus::Completed => super::graph::MemberOutcome::Completed {
                        output: snapshot.result_summary.unwrap_or_default(),
                    },
                    AgentStatus::Failed | AgentStatus::Cancelled | AgentStatus::Closed => {
                        super::graph::MemberOutcome::Failed {
                            reason: snapshot
                                .error
                                .unwrap_or_else(|| "worker ended without completing".to_string()),
                        }
                    }
                    // `wait_agents` with no timeout only returns on terminal
                    // status, so this is purely defensive — treat as a failure.
                    other => super::graph::MemberOutcome::Failed {
                        reason: format!("worker returned non-terminal status {other:?}"),
                    },
                })

View on GitHub (pinned to 7491200858)

Solutions

  1. Check the tinyagents wait_agents response shape for changes (API drift between harness versions)
  2. Inspect the orchestration records for the worker's actual terminal state
  3. Report/reproduce with harness logs if the snapshot is intermittently missing
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/agent/orchestration/agent_teams/runtime.rs:300 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/e3c884ae26206bc9. Report an issue: GitHub.