Multi-agent patterns · Codex-style workflows

One thread to manage them all.

Modern coding agents can spawn a manager thread that supervises worker threads, uses heartbeats to keep checking in, and runs goal verification so no task is silently abandoned. Drag the scene, then change the knobs.

Drag to rotate · pulses = heartbeats

Control room

/goal verification
0
Tasks done
0
Stalls caught
0
Tasks lost
Throughput /min

Workers randomly stall. With verification on, a red heartbeat catches the stall and the manager restarts the task. With it off, stalled work is lost.

The three primitives

Delegation is easy. Supervision is the hard part.

1

Manager thread

Instead of one long conversation doing everything, a single coordinating thread spawns worker threads, hands each a scoped task, and owns the merged result. This isolates context: each worker only sees its own problem, so it stays focused and cheap.

2

Heartbeats

A heartbeat is a scheduled check-in — "every N seconds/minutes, report status or re-run the check." It converts a fire-and-forget prompt into a supervised process. The same trick keeps distributed systems honest, from Kubernetes liveness probes to Erlang supervisors.

3

Goal verification

A /goal-style command pins an explicit success condition to each worker thread. At every heartbeat the manager asks: is the goal met? Agents are great at starting work and mediocre at noticing they stopped — verification closes that gap.

The pattern is old: it is a supervisor tree. Erlang shipped it in 1986 for telecom switches that could not be allowed to die quietly. Agent workflows are rediscovering it because LLM workers fail the same way processes do — silently, partially, and at 3 a.m.

Worked example

Scheduling 12 tasks across 4 workers

Assumptions

QuantityValueWhy it matters
Tasks in queue12Refactors, tests, docs — independent units
Workers4Parallel threads spawned by the manager
Mean task time6 minIncludes model latency and tool calls
Stall probability15% per taskWorker wanders off, loops, or declares false victory
Heartbeat interval2 minHow fast a stall gets noticed
Naive (no supervision):
  expected finished = 12 × (1 − 0.15) = 10.2 tasks — ~2 tasks silently lost.

Supervised (heartbeat + /goal):
  stall detected within ≤ 2 min, task requeued once →
  loss rate ≈ 0.15² = 2.25% → expected finished ≈ 11.73 tasks.

Wall-clock: ceil(12 / 4) waves × 6 min = 18 min base
  + retries: ~1.8 restarts × (2 min detection + 6 min rerun) spread over 4 workers ≈ +3.6 min
  → ≈ 22 min total, versus "18 minutes and 2 missing deliverables."

The trade is explicit: supervision costs ~20% more wall-clock time and buys you a ~7× reduction in silent failures. For work you actually have to ship, that is almost always the right side of the trade.

Enjoy this tool? Build your own with Super