
Is Multi-Agent Worktree Just Git Worktree?
Yes. It is git worktree used as isolation for agent workflows: one repository, multiple directories, and far fewer workspace collisions.
Yes. It is git worktree.
In a multi-agent setup, the reason to use it is straightforward: it solves the most dangerous problem in parallel work on one repository, which is file conflict inside a shared workspace.
The Problem Is the Shared Workspace
If every agent edits code directly inside the same working directory, things break quickly:
Project directory: /project
└── src/server.py
Agent A fixes a bug on line 41
Agent B adds a feature on line 55
Both agents edit the same workspace at the same time
That leads to overwrites, dirty state, and coordination failures
What Worktrees Change
git worktree lets one repository check out multiple branches into separate directories.
Main repo: /project
git worktree add ../project-agent-a agent-a-branch
git worktree add ../project-agent-b agent-b-branch
Result:
/project/ -> main coordinator
/project-agent-a/ -> dedicated to Agent A
/project-agent-b/ -> dedicated to Agent BThose directories share one Git database, but each one gets its own:
- working files
- checked-out branch
- staging area
That is what allows true parallel work without direct workspace interference.

Why Not Just Clone the Repo?
With git clone, every copy contains a full .git database.
With git worktree add, you are adding another working directory around the same repository.
git clone:
/project-copy-1/.git
/project-copy-2/.git
git worktree:
/project/.git -> one shared Git database
/project-agent-a/ -> extra working directory
/project-agent-b/ -> extra working directoryFor one repository with several parallel jobs, that difference matters.

In a Multi-Agent Setup
Most teams use a flow like this:
- The orchestrator receives a task that can be split
- It creates one branch and one worktree per subtask
- Each agent works in its own directory
- Each branch is committed independently
- The main repository merges the finished branches
- The temporary worktrees are removed
git worktree add ../task-refactor -b refactor-user
git worktree add ../task-fix-pay -b fix-payment
Agent A -> ../task-refactor
Agent B -> ../task-fix-pay
When done:
git merge refactor-user
git merge fix-payment
git worktree remove ../task-refactor
git worktree remove ../task-fix-pay
That is the whole setup: one Git repository, several isolated working directories, and a merge step at the end instead of file collisions during the work.


