Guide
Git worktrees — run 10 agents in parallel without chaos
Jul 21, 2026 · 6 min read
What git worktrees are, how to create one in 60 seconds, and how to run multiple AI coding agents on different features at the same time with Zoku.
If you commented worktrees on the reel — this is for you.
By the end you'll know:
- What a git worktree actually is
- How to create one in under a minute
- How to run multiple AI coding agents on different features at once
- The easiest way to do all of this with Zoku (free)
The problem (why clones suck)
You want Agent A on auth, Agent B on billing, Agent C on settings.
If they all work in the same folder:
- They overwrite each other's files
- Git gets confused about which branch you're on
- One bad edit nukes another agent's progress
People usually “solve” this by cloning the repo 10 times. That works… until you're juggling 10 copies of node_modules, 10 forgotten branches, and zero shared git history.
Worktrees fix this.
What is a git worktree?
A worktree is a second (or tenth) checkout of the same repo, living in its own folder, usually on its own branch.
You get isolation for agents without pretending you have 10 different repos.
my-project/ ← main (branch: main)
.zoku/worktrees/
feature-auth/ ← worktree
feature-billing/ ← worktree
feature-settings/ ← worktreeEach folder is a real project directory. Open it in Cursor / Claude Code / Codex. Commit normally. Agents don't step on each other.
Create your first worktree (60 seconds)
From your main repo:
# New branch + folder in one shot
git worktree add ../my-project-auth -b feature/auth
# Or attach an existing branch
git worktree add ../my-project-billing feature/billingCheck what you have:
git worktree listRemove one when you're done:
git worktree remove ../my-project-authThat's the whole primitive. Everything else is workflow.
The parallel-agent workflow
This is the pattern from the reel:
- One worktree per feature —
feature/auth,feature/billing, … - One agent per worktree — Cursor in one folder, Claude in another, Codex in a third
- Merge when ready — review PRs independently, land them one at a time
Mental model
Agent 1 → worktree A → branch A → PR A
Agent 2 → worktree B → branch B → PR B
Agent 3 → worktree C → branch C → PR CSame repo. Same history. Zero interference.
Tips that save you pain
- Name folders after the feature, not the agent (
auth-fix, notcursor-3) - Don't reuse a dirty worktree for a new task — create a fresh one
- Closing a terminal ≠ deleting the worktree — clean up with
git worktree removewhen the branch is merged - One agent owns one worktree — never point two write-happy agents at the same folder
By hand vs with Zoku
By hand
Works fine for 2–3 agents:
git worktree add ~/.zoku/worktrees/auth -b feature/auth
git worktree add ~/.zoku/worktrees/billing -b feature/billing
# open each folder in your editor / agent CLIAt 10 agents, the bookkeeping gets annoying: paths, branches, which tile is which, cleanup.
With Zoku (the easy path)
Zoku is a macOS companion with a Coding Use canvas — tiling terminals for coding agents (Cursor, Claude Code, Codex, and friends).
Spawn an agent in a worktree with voice or a short command, e.g.:
“open claude worktree named auth fix”
Zoku will:
- Create (or reuse) a worktree for that feature
- Put the agent in its own tile
- Keep agents isolated so they don't overwrite each other
Closing a tile does not delete the worktree — your work stays until you clean it up with git.
That's how you actually run 10 agents on 10 features without turning your machine into a folder graveyard.
Quick start with Zoku
- Download Zoku free
- Open Coding Use
- Spawn agents on worktrees — one feature per tile
- Let them cook in parallel
- Review → PR → merge → remove stale worktrees when you're done
Cheat sheet
# Create
git worktree add <path> -b <new-branch>
git worktree add <path> <existing-branch>
# List
git worktree list
# Remove
git worktree remove <path>
# After deleting folders by hand
git worktree pruneTL;DR
- Worktrees = multiple folders, one repo, isolated branches
- One worktree per feature = safe parallel agents
- Zoku = the canvas that makes spawning those agents dead simple