Git Worktrees for Parallel Agents
Using Git worktrees to run multiple Claude Code sessions against the same repository in separate working directories, so parallel agents can work without constantly colliding over the same files.
Key points
- Claude Code’s
--worktreeflow creates isolated working directories tied to separate branches [src-011]. - This enables three to five parallel sessions to explore or implement different parts of a project without file conflicts [src-011].
- Worktrees are especially useful for comparison tasks: one agent can test an approach while another explores an alternative [src-011].
- The pattern works best when each agent has a clear ownership boundary and a narrow brief [src-011].
Related entities
- claude-code — runtime that launches worktree-backed sessions
Related concepts
- agent-teams — related multi-agent coordination pattern
- decomposition-pattern — split the project into parallelisable parts
- session-chaining — complementary approach for sequential decomposition
Source references
- [src-011] Nate Herk — Claude Code power features cluster (2026-04-20 to 2026-04-27)
Recommended next
Keep reading from this thread
From 494 indexed pages and articles.
- Wiki concept Session Chaining The practice of decomposing a large project into a sequence of specialised Claude Code sessions — discovery, planning, execution — where each session's output document becomes Related by 011
- Wiki concept Agent Teams A Claude Code multi-agent mode where agents share a task list, can communicate directly with each other, and can assign work to one another Related by 011
- Insight AI Beyond POCs How enterprise AI moves beyond proofs of concept through ownership, governance, measurement, adoption, and production operating models Readers have engaged with this next