Worktree Orchestrators Compared — Aider, Claude Code, and Custom Scripts
Aider, Claude Code, and scripts each assign coordination to someone different.

- Written by
- Priya Nandakumar
- Published
- November 9, 2026
- Reading time
- 8 min read
- Sources cited
- 1 sources ↓
What this covers
- Why worktree orchestration became the central problem in parallel agent development
- The three approaches differ not in what they do but in who carries the complexity
- Aider puts the developer in full control by design, which is both its limit and its foundation
- Claude Code absorbs orchestration complexity natively, but that absorption creates its own overhead
Worktree orchestration is a choice about who manages complexity. Aider leaves coordination with the developer, Claude Code absorbs it into the tool, and custom scripts place it in team infrastructure. The best fit depends on where that responsibility belongs in the workflow. None of the three makes isolated code checkouts equivalent to isolated runtime environments.
Why worktree orchestration became the central problem in parallel agent development
AI coding agents now write, commit, and iterate autonomously, which breaks the assumption that a repository has one active writer. Two write-capable agents sharing a working directory can collide on files, overwrite state, and disrupt history. These failures follow from the shared workspace itself. They are not simply mistakes that better prompts prevent.
Git worktrees give each agent a linked working directory, its own branch, and a private index, while all agents share one object store. That mechanism has become the common isolation primitive for parallel agent development. But separating checkouts leaves someone responsible for assigning scope, starting sessions, reviewing changes, and merging results.
The three approaches differ not in what they do but in who carries the complexity
The decisive distinction is who owns that coordination. With Aider, the developer selects files, chooses models, and manages independent sessions. Claude Code takes on codebase navigation, sub-agent coordination, and per-worktree state. Custom scripts and orchestration frameworks put those decisions into tooling that the team configures and maintains.
Developer-held complexity makes decisions explicit, tool-held complexity enables autonomy, and infrastructure-held complexity allows workflows to span agents and systems. The costs fall along the same lines: the developer coordinates work by hand, the tool adds overhead, or the team has more to maintain.
Aider puts the developer in full control by design, which is both its limit and its foundation
Aider assumes that the developer is the orchestrator. The user adds files explicitly with /add, reviews diffs before they apply, and can switch models with /model. Control stays close to the editing task.
Aider’s Repository Map provides broader context without handing navigation over to the agent. Tree-sitter parses code into an AST and extracts function signatures and class definitions. The map uses PageRank to build a dependency graph and keeps the content that matters within the token budget. The developer can understand how repository context is assembled rather than relying on the tool to decide where to explore.
Every AI change becomes an atomic git commit with a descriptive message, producing granular, reversible history. Aider is Apache 2.0 open source, and using a local Ollama model costs nothing. For hosted models, the developer pays for API calls to the chosen provider. Model choice is therefore independent of the coordination approach.
Those benefits do not include a parallel coordination layer. Aider is single-threaded by design, with one conversation, one set of files, and one task at a time. Several terminals can each run a session, but those sessions work on their own. Worktree setup, task boundaries, and merging all stay with the developer, without built-in guardrails between sessions.
Claude Code absorbs orchestration complexity natively, but that absorption creates its own overhead
Claude Code’s native worktree support moves much of that work into the tool. It can spawn and coordinate sub-agents, enabling parallel agent work without requiring the developer to assemble the coordination layer first. Plan mode, hooks, permissions, and conversation transcripts attach to the worktree. Agents can maintain separate plans without seeing one another’s edits. Memory, however, is shared across worktrees of the same repository.
That separation supports a more autonomous approach to context. Claude Code greps, reads, and decides which files are relevant without requiring the developer to identify them in advance. Large tasks can benefit from that freedom. The corresponding cost is opacity, because debugging a poor result includes understanding the tool’s context decisions, unlike Aider’s transparent repository map and explicit file selection. The tool takes over work that the developer would otherwise perform, but also makes some decisions less visible.
Native orchestration on its own does not cut token use. An agent allowed to explore the whole codebase consumes far more tokens than one given a narrow task and a CLAUDE.md that forbids editing outside its directory. The developer still has to set the scope even when the tool manages sessions. The workflow also accepts Anthropic model lock-in and subscription cost.
Custom scripts distribute complexity across the team's infrastructure, which scales further but breaks differently
Custom scripts move orchestration out of the individual session and into team tooling. Small automation scripts can standardize worktree setup and reduce the manual steps before each new agent session. They can also launch agents regardless of native orchestration support. The team defines the workflow. In return, it owns failures in setup, coordination, and merge discipline.
That flexibility supports combinations that a single agent interface may not provide. A Writer/Reviewer pattern uses one Claude instance to write and another to review, with context cleared between them. A Plan/Execute pattern assigns planning to more powerful models and execution to faster models. These coordination policies derive their value from assigning different roles to agents within a shared workflow.
Open-source orchestrators formalize what hand-written scripts once handled ad hoc. Agent Orchestrator, formerly Composio Agent Orchestrator, supports 26 worker agent harnesses, including Claude Code, Codex, and Aider. Claude Squad has a terminal UI for managing agents and custom commands in tmux sessions, each with its own worktree. Its emphasis is human-in-the-loop session management. These tools sit on the same continuum as custom Bash, with the team still choosing how much coordination to encode.
More configurable orchestration does not make every task parallel. A practitioner who built a large multi-agent Bash system concluded that parallel-first execution was a dead end because parallel work paid off only for genuinely independent, large-scale tasks. Dependencies still determine what can run together. Even independent code changes can collide during execution, because two branches may both expect port 3000 on localhost and try to write migrations into the same shared database. Separate checkouts do not separate those resources.
Worktree isolation contains code conflicts but leaves runtime state — ports, databases, secrets — entirely unresolved
File isolation is narrower than either semantic or runtime isolation. Agent A can rename a function that Agent B still references, even when their edits remain perfectly separated. That disagreement becomes visible when the changes come together, beyond the worktree mechanism’s ability to detect it, so cleanly isolated development still requires integration review. A branch boundary contains edits while leaving assumptions about how the software works unchecked.
Parallel agents on one machine share ports, databases, and external services unless those resources are separately provisioned. The team still has to supply per-tree environment files, scratch databases, and port ranges because worktrees do not provide them. Secrets belong to that environment problem as well. None of the three orchestration approaches makes runtime separation follow automatically from branch separation.
Scott Chacon’s Grit project, a complete rewrite of Git in Rust using agents, illustrates how parallel work can undermine verification. Chacon’s post-mortem describes a parallel agent breaking a fundamental part of the testing harness, making the result look like a massive regression. The role of uncoordinated parallel writes in the failure remains unestablished in the post-mortem, limiting what the example proves. Worktrees could have confined the damage to one branch, but containing it through integration would also have required sufficiently frequent merge checkpoints.
The ARF/BEA 2026 academic campaign demonstrates the importance of that additional layer. It ran several sessions at once on a single Mac without a merge conflict reaching main, using the framework’s built-in verifier gates and strict rules for merging. By contrast, the two-week field log on GitHub issue #208 in YAAH reported that clean-merge rates fell, token spending tripled, and only approximately three agents could work together in practice. Review remained the bottleneck regardless of the orchestration tool.
A Cursor user reported extreme disk consumption in a short time on a roughly 2 GB codebase when automatic worktree creation was enabled across many agents. Besides the resources they use, agents cannot run in parallel when one needs another’s output. The overhead of coordinating agents also grows non-linearly as more agents join the work. The next step is therefore to manage runtime-state and verify the work, going beyond making more agents easier to launch.
How to match the complexity distribution to your actual workflow
The practical decision begins with the responsibility a team is prepared to hold. Aider fits workflows where model freedom, local models, cost control, and mid-session switching are hard requirements. It also fits teams that prefer transparent context management and reversible atomic commits to autonomous navigation. It works best on a single-agent task with a clear scope when the files it needs are already known.
Running Aider under Agent Orchestrator or Claude Squad adds a worktree coordination layer that Aider does not provide natively. The hybrid keeps the editing tool while changing who manages sessions. It is appropriate when the team values Aider’s interaction model but no longer wants the developer to perform every setup and coordination step manually.
Claude Code’s native support fits larger tasks where letting the agent find its own way through the codebase helps it do the work. It also fits regular parallel sprints in one repository when Anthropic model lock-in and subscription cost are acceptable. For teams making that choice, narrow task definitions and CLAUDE.md scope constraints are mechanisms for managing token spending. Agent Teams has a research preview that tracks which tasks depend on others, providing partial support but not a stable guarantee.
Custom scripts or a meta-orchestrator fit teams that need different agent types across tasks or want existing CI/CD infrastructure to own orchestration logic. They also fit workflows that have outgrown either tool’s native support. Within that layer, Claude Squad suits terminal-native solo work, Agent Orchestrator targets PR-level automation, and Emdash supports cross-platform team workflows. The selection depends on the coordination role required. Adopting a framework changes how much the team builds, but does not remove its responsibility for the surrounding infrastructure.
Most teams running sustained parallel agent work in 2026 combine these tiers. Interactive work uses Aider or Claude Code directly, parallel sprints use native worktree support or session managers, and overnight backlog work moves to cloud or async runners. Without additional verification infrastructure, around three concurrent agents remains a practical planning limit for clean parallel work, with review bandwidth constraining throughput. Containerization and cloud preview environments address the next layer, which the infrastructure approach most naturally reaches first. The direction is toward isolating and verifying the environment in which agents execute.
Methodology & sources
- 9 Open-Source Agent Orchestrators for AI Coding (2026)
Supplied the details on open-source orchestrators such as Agent Orchestrator, Claude Squad and Emdash, and what each is suited for.