BuildSeniorData / MLAuto-graded
Fan out to agents and merge what succeeded
Keep a fan-out running when some workers fail, and combine what succeeded in input order.fan_out(items, worker, reduce_fn, max_workers=4, errors=None) runs a worker (a sub-agent) on each item and hands the results to reduce_fn. Right now the first worker that raises crashes the whole call. Make it try every item, record each failure in the caller's errors list instead of raising it, and reduce only the successful results, in input order. Threads or a plain loop are both fine; only the output is checked.35 min
python
You're done when
- A worker that raises doesn't crash the fan-out.
- Every item is tried, even after earlier ones fail.
- A failing item ends up as a recorded error, and no exception reaches the caller.
reduce_fnreceives only the successful results.- The reduced value is correct.
- Results come back in input order, whatever order the workers finish in.
What it measures
Agent engineeringWriting the fan-out and reduce step that most multi-agent setups rely on.
Context engineeringChoosing what reaches the reduce step: only the successful results, in input order, with no error entries mixed in.
Designing for partial failureTreating a failing worker as normal, so the rest of the batch still completes.
Your environment
Terminal + editorA full shell in the browser
Claude CodePre-authenticated, no key setup
Isolated microVMYours alone, wiped afterwards
Start this lab
35 min
Start labYou'll sign in to Anthropos to start. The lab opens in a private cloud workspace with Claude Code ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo