Three approaches to orchestrate multiple Claude Code instances — from simple parallel sessions to full-scale autonomous coordination with 20+ agents.
First-party multi-agent system. One lead spawns teammates that communicate via shared task lists and peer-to-peer messaging. Richest coordination model with dependency tracking, plan approval, and file locking. Best for collaborative work where agents need to discuss, debate, or build on each other's output.
Lead creates tasks → Tasks appear in shared list → Teammates claim via file lock → Work completes → Dependencies auto-unblock → Lead synthesizes results.
Bidirectional: teammates message each other directly (not just report to lead). Broadcast sends to all. Idle notifications automatic.
Each teammate: own 200k context window. Shared filesystem but NOT conversation history. CLAUDE.md is the shared context mechanism.
~4x solo for 3 teammates (~800k tokens). Each is a full Claude instance. Mix models (Opus/Sonnet/Haiku) to optimize cost.
Terminal UI for managing parallel AI sessions. Each agent runs in its own tmux session and git worktree — fully isolated branches, zero file conflicts. You coordinate. Supports Claude, Aider, Codex, Gemini, and custom tools. Best for independent parallel tasks where agents don't need to talk to each other.
Human creates session via TUI → spawns tmux + git worktree → agent works in isolation → human reviews diff → merges branch.
tmux isolates the terminal session. Git worktree isolates the filesystem. Each agent on its own branch. Zero file conflict risk.
Supports Claude, Aider, Codex, Gemini CLI, OpenCode, Qwen, and custom tools. Mix different AI agents per session.
Auto-accept permissions for unattended work. Safe: changes stay on isolated branches. Review diff before merging.
Full orchestration platform with a Mayor agent that decomposes goals, spawns workers, and handles failures. All state is git-backed — agent identity, tasks, and progress survive crashes. Manager hierarchy enables structured delegation at scale. Best for large complex projects requiring 10+ agents with crash recovery and automated coordination.
Goal → Mayor decomposes into Convoys (epics) → Convoys hold Beads (tasks) → Manager assigns to Workers → Workers persist progress to Hooks → Merge.
Session dies? Heartbeat times out (5 min). Identity + task + progress survive in git-backed Hooks. New session reads Hook and resumes.
Mayor → Manager Polecats → Worker Polecats. Three delegation levels. Managers coordinate sub-teams independently. Max depth configurable.
20-30 concurrent agents. Configurable limits prevent fork bombs. Dolt for structured state. Git worktree per agent for isolation.
| Feature | Agent Teams | Claude Squad | Gas Town |
|---|---|---|---|
| Scale | 3-5 agents | 5-10 agents | 20-30 agents |
| Agent Communication | Peer-to-peer | None | Mailboxes |
| Task Coordination | Automated (lead) | Human | Automated (Mayor) |
| Crash Recovery | None | Partial (tmux) | Full (git-backed) |
| Setup Complexity | Low (feature flag) | Low (brew install) | High (Go + Dolt) |
| Git Isolation | Manual | Automatic worktrees | Automatic worktrees |
| Agent Hierarchy | Flat | Flat | Multi-level |
Do agents need to talk to each other? ├─ NO → Claude Squad (simple, isolated, human-managed) └─ YES → How many agents? ├─ 3-5 → Agent Teams (native, peer messaging, shared tasks) └─ 10+ → Need crash recovery? ├─ YES → Gas Town (persistent state, Mayor coordination) └─ NO → Agent Teams (scale up with multiple leads)