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
- PostgreSQL 19 slips to November as LLM-assisted code review floods committers with edge cases — sanjaykalra · 2026-10-21
- Open-sourced pixel art normals generator ships as Rust CLI and wasm library — HugoDuprez · 2026-10-20
- Eval researcher teases guide to subjective-task evals, with a curated resource list — cwolferesearch · 2026-10-20
- Eon cuts engineer onboarding from 2 days to 2 minutes with an MCP Gateway on Bedrock AgentCore — AWS ML Blog · 2026-10-20
- On building persistent agents: owning your agent's memory stack — omarsar0 · 2026-10-20
- Mintlify launches Autopilot beta: an always-on agent that keeps docs in sync with your code — ycombinator · 2026-10-20