{"record":{"id":"e3c884ae26206bc9","repo":"tinyhumansai/openhuman","slug":"worker-snapshot-missing-after-wait","errorCode":null,"errorMessage":"worker snapshot missing after wait","messagePattern":"worker snapshot missing after wait","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/orchestration/agent_teams/runtime.rs","lineNumber":300,"sourceCode":"                        .collect(),\n                        ..Default::default()\n                    })\n                    .await\n                    .map_err(|e| anyhow!(\"spawn teammate worker failed: {e}\"))?;\n\n                let wait = session\n                    .wait_agents(WaitAgentOptions {\n                        orchestration_ids: vec![resp.orchestration_id.clone()],\n                        timeout_ms: None,\n                    })\n                    .await\n                    .map_err(|e| anyhow!(\"wait teammate worker failed: {e}\"))?;\n\n                let snapshot = wait\n                    .agents\n                    .into_iter()\n                    .find(|a| a.orchestration_id == resp.orchestration_id)\n                    .ok_or_else(|| anyhow!(\"worker snapshot missing after wait\"))?;\n\n                Ok(match snapshot.status {\n                    AgentStatus::Completed => super::graph::MemberOutcome::Completed {\n                        output: snapshot.result_summary.unwrap_or_default(),\n                    },\n                    AgentStatus::Failed | AgentStatus::Cancelled | AgentStatus::Closed => {\n                        super::graph::MemberOutcome::Failed {\n                            reason: snapshot\n                                .error\n                                .unwrap_or_else(|| \"worker ended without completing\".to_string()),\n                        }\n                    }\n                    // `wait_agents` with no timeout only returns on terminal\n                    // status, so this is purely defensive — treat as a failure.\n                    other => super::graph::MemberOutcome::Failed {\n                        reason: format!(\"worker returned non-terminal status {other:?}\"),\n                    },\n                })","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/orchestration/agent_teams/runtime.rs#L282-L318","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/agent/orchestration/agent_teams/runtime.rs:300 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the tinyagents wait_agents response shape for changes (API drift between harness versions)","Inspect the orchestration records for the worker's actual terminal state","Report/reproduce with harness logs if the snapshot is intermittently missing"],"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-14T00:17:10.932Z"}