tinyhumansai/openhuman · error
workflow fan-out: expected
Error message
workflow fan-out: expected {expected_outcomes} result(s), got {} What it means
After fan-out, the number of result outcomes did not match the expected worker count for the phase. An invariant violation of the orchestration session's fan-out contract (lost or extra outcomes) — defensive guard so a miscounted result set is never silently iterated with missing/extra worker outputs. Indicates a harness bug or API drift rather than a user input fault.
Solutions
- Capture the expected vs got counts alongside the session's fan-out response for a bug report
- Check for tinyagents version drift where wait/fan-out semantics changed
- Retry the run; if deterministic, the session's outcome aggregation is broken and needs upstream investigation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/agent/orchestration/workflow_runs/engine.rs:728 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/6ae103a92c0160d1.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/orchestration/workflow_runs/engine.rs:728
return Ok(PhaseExecOutcome::Terminated);
}
Err(err) => return Err(anyhow!("workflow fan-out failed: {err}")),
};
let mut outcomes = Vec::with_capacity(expected_outcomes);
for item in outcome.outcomes {
match item.result {
Ok(value) => outcomes.push(value),
Err(err) => {
return Err(anyhow!(
"workflow fan-out: worker {} failed: {err}",
item.index
));
}
}
}
if outcomes.len() != expected_outcomes {
return Err(anyhow!(
"workflow fan-out: expected {expected_outcomes} result(s), got {}",
outcomes.len()
));
}
// Aggregate worker outcomes in phase order: record every spawned
// child id, collect completed outputs, and surface the first failure.
for outcome in outcomes {
if let Some(oid) = outcome.orchestration_id {
spawned_this_phase += 1;
child_run_ids.push(oid);
}
match outcome.output {
Some(out) => phase_outputs.push(out),
None => {
if phase_failed.is_none() {
phase_failed = outcome.error;
}View on GitHub (pinned to 7491200858)