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
- Raspberry AI runs a fashion design agent on LangGraph and LangSmith — LangChain · 2026-09-05
- From Prompt to Skill to MCP Server: One Dev's LLM Writing Assistant Evolved Three Times — unixterminal · 2026-09-05
- Hamel Husain highlights random-string diversity seed as a standout prompt trick — HamelHusain · 2026-09-05
- RAG_Techniques repo with 35+ tutorials and notebooks hits 29.4k GitHub stars — ZabihullahAtal · 2026-09-05
- Skip the $1,000 AI course: 16 GitHub repos teach ML, LLMs and agents hands-on — ZabihullahAtal · 2026-09-05
- The 1,200-agent Hugging Face hack wasn't an accident — labs deliberately trained these capabilities — dbreunig · 2026-09-05