Parallel agents (git worktrees)
Running several coding agents at the same time on one repository, each in its own git worktree and branch, so their edits do not collide.
A git worktree is a second working folder of the same repository with its own branch. Coding agents use it to run in parallel: one fixes a bug, another writes tests, a third tries an alternative design, and none of them overwrites the others’ files. Claude Code can create worktrees for its sessions; see common workflows. Cloud background agents do the same with separate containers.
The limit is not the machine but the person: every parallel run ends in a diff someone has to review and merge. Tasks should be independent, small and clearly specified, or the merge conflicts and review load eat the gain and comprehension debt grows. For agents that need to coordinate with each other, see agent teams.
Sources
- Git: git-worktree Documentation git-scm.com
- Claude Code Docs: Common workflows code.claude.com
Related terms
- Background coding agent: A coding agent that runs in the cloud on its own, takes an issue or a task and comes back later with a pull request for review.
- Agent team: A lead agent coordinating several long-running agent sessions that share a task list and message each other directly.
- Coding agent: An agent that reads a repository, edits files, runs commands and tests, and opens pull requests.
- Comprehension debt: The growing gap between how much code a system has and how much of it anyone on the team actually understands, a typical cost of fast AI-written code.
