Manager agent + workers in git worktrees: orchestration that survived overnight runs
Fragrant_Yoghurt1135 · reddit · 2026-09-05
A practitioner shares the multi-agent orchestration architecture that survived long unattended overnight runs:
- Shape: one long-lived manager agent that plans, allocates, reviews and reconciles but never writes code; workers are headless agent processes each pinned to its own git worktree (one writer per worktree). Every unit of work is a brief written to disk before dispatch; workers write findings to unique report files, with the returned message only a convenience copy.
Lessons only visible unattended:
- Silence is not "no findings": one night 6 of 10 workers returned nothing, yet all work existed on disk, one having completed an entire phase gate.
- Exit codes lie both ways; only the report file's status line is trusted. Log-grepping ledgers rot — read the artifact.
- Concurrency cap: at most 2 workers at once, beyond which they contend for test runners/dev ports; never kill processes by name pattern.
- Prompt budgets are advisory; an external watchdog polls session files, counts turns and terminates past a cap.
- Adversarial verification: the writer never verifies its own change; verification and staged-diff scope review go to agents with no knowledge of the change — more effective than any prompt engineering.
Open problems: manager context as multi-day bottleneck, unit-of-work sizing, drift detection, and automating the rule-improvement loop.
More from coding & agent
- Vibe coding a feature store in a week: duckdb + S3 tables is all you need — generativist · 2026-12-05
- The underrated alpha: an AI agent that tracks local events and nudges you to attend — mimi10v3 · 2026-12-05
- Dev open-sources Cred after saying Anthropic 'shipped my startup' — agent access without sharing credentials — sull · 2026-12-05
- Microsoft paper: LLMs solving 97% of math still can't tell which answers are wrong — rohanpaul_ai · 2026-12-05
- Free Full AEO Course Drops: Winning Traffic in the Age of AI Search — jia_seed · 2026-12-05
- A personal agent's tidy-looking plan had its steps in the wrong order — the_crooked_badger · 2026-12-05