macOS
Apple Siliconv2.2.18 · 2026-11-29 · 251 MB
Download for macOSmacOS 12 or later · Signed & notarized · Automatic updatesTwo agents in one checkout edit the same files and trip over each other's changes. A git worktree gives each task its own folder and branch from the same repository.
An agent edits the files in the folder it runs in. Start two agents in one checkout and they share it: one agent's half-finished edit breaks the other's build or tests, both stage into the same index, and the diff no longer says whose change is whose.
git worktree adds working trees to one repository. Each worktree is its own folder with its own checked-out branch, index and files; they share the history, the branches and the remotes (git documentation). Git checks out a branch in one worktree at a time.
A new worktree has the tracked files and nothing else: no .env, no node_modules, no build output. That is the part to plan for.
One folder and one branch per task, next to the main checkout:
# one worktree and branch per task
git worktree add ../myapp-pricing -b agent/pricing
git worktree add ../myapp-tests -b agent/tests
# copy what git does not track, then install
cp .env ../myapp-pricing/
cd ../myapp-pricing && npm ci
# start one agent in each folder
claude # in ../myapp-pricing
codex # in ../myapp-tests
# see them all
git worktree list
Claude Code can make the worktree itself: claude --worktree pricing creates .claude/worktrees/pricing/ on a new branch worktree-pricing and starts in it, and a .worktreeinclude file lists the ignored files to copy in (Claude Code docs).
.worktreeinclude (gitignore syntax) lists the ignored files to copy from the main checkout, such as .env. It is the same file Claude Code reads..codara/worktree.json adds large ignored folders to link instead of copy, a setup command and terminals to open. Studio never links a folder the setup command installs into (such as node_modules when setup runs npm ci), and runs a setup command only after you approved it for that repository.codara_worktree_create tool gives an agent a worktree of its repository on its own branch, with the same setup.Both files live in the repository and are meant to be committed. This one copies the .env files, links a large ignored test-data folder that no install fills, installs node_modules fresh with npm ci and opens a dev server:
# .worktreeinclude
.env
.env.local
# .codara/worktree.json
{
"link": ["test-data"],
"setup": ["npm ci"],
"terminals": [{ "name": "Dev server", "command": "npm run dev" }]
}
You do not have to write them by hand: Set up worktrees… finds the ignored .env files, the folders worth linking and an install command for your lockfile (Studio docs).
By hand, review and push from inside the worktree, then remove it once the branch is merged:
cd ../myapp-pricing
git diff
git commit -am "Add the pricing page"
git push -u origin agent/pricing # then open a pull request
# after the pull request is merged
cd ../myapp
git worktree remove ../myapp-pricing
git branch -d agent/pricing
git worktree prune # forget worktrees whose folder is gone
In Studio, review the diff, commit and open the pull request from Source control. Clean up worktrees… lists every worktree across your repositories with its size, its last activity and whether its branch is merged, and removes the ones you pick. An agent's codara_worktree_remove removes a worktree only when it is clean and its work is merged or abandoned, and never forces.
claude --worktree and .worktreeinclude do the setup without another app.-b, or remove the other worktree first..env and dependencies are missing. Copy them, or list them in .worktreeinclude.git worktree prune.Git sets no fixed number; each worktree is a folder on your disk. In Codara Studio, agents together can make at most 20 per repository; the ones you make yourself do not count.
The repository's history, branches and remotes. Each worktree has its own files, its own index and its own checked-out branch.
Yes. claude --worktree NAME creates a worktree under .claude/worktrees/ on a new branch and starts Claude Code in it.
No. The git commands on this page work in any terminal. Studio does the setup, the copying and the clean-up for you, and shows every agent's state in one window.
Claude Code is Anthropic's, Codex is OpenAI's, Conductor is Melty Labs'; Codara Studio is not affiliated with any of them.
Read next:
Get started
Free & open source. Bring your own agent accounts.
v2.2.18 · 2026-11-29 · 251 MB
Download for macOSmacOS 12 or later · Signed & notarized · Automatic updatesv2.2.18 · 2026-11-29 · 209 MB
Download for WindowsWindows 10 or later · Automatic updates · Currently unsigned