A git worktree is a separate copy of your repository on its own branch. It shares the same git history as your main repo but has its own files in its own folder. You can have as many as you want open at once.
the problem worktrees solve
Normally, your repo is one folder with one branch checked out. If you want to work on two features at the same time, you'd have to stash your changes, switch branches, do the other work, switch back, and unstash. It's annoying.
With worktrees, you get a second folder that's already on a different branch. Work on Feature A in one folder, Feature B in another. No stashing, no switching. Both exist at the same time.
why this matters for ai agents
If you run two AI agents in the same folder, they'll overwrite each other's changes. Agent A edits auth.ts. Agent B also edits auth.ts. Whoever saves last wins. The other agent's work is gone.
Worktrees fix this. Each agent gets its own folder, its own branch, its own copy of the files. They can both edit auth.ts at the same time without stepping on each other. When they're done, you merge each branch separately.
what it looks like on disk
my-project/ ← your main repo (main branch)
../my-project-feature-a/ ← worktree (feature-a branch)
../my-project-feature-b/ ← worktree (feature-b branch)
All three folders share the same git history. Changes committed in one worktree are visible in the others once merged. But uncommitted file edits are completely isolated.
how pane automates this
You don't need to run git commands yourself. When you create a new pane in Pane:
Pane creates the worktree and branch for you.
It copies over your env vars, node_modules, and other important directories so your agent can start working immediately.
When you archive the pane, Pane cleans up the worktree automatically.
the manual way (for reference)
If you wanted to do this without Pane:
git worktree add ../feature-a feature-a
cd ../feature-a
claude # start your agent here
# when done:
git worktree remove ../feature-a
A git worktree is a separate checkout of your repository. It has its own folder, its own branch, and its own files, but shares the same git history as your main repo. You can have multiple worktrees open at once, each on a different branch.
A branch is just a pointer to a commit. You can only have one branch checked out in a folder at a time. A worktree gives you a second (or third, or fourth) folder, each with its own branch checked out. You can edit files in all of them at the same time.
A clone copies the entire repository, including all the git history. A worktree shares the git history with your original repo, so it takes almost no extra disk space and stays in sync automatically.
If two agents work on the same files in the same folder, they'll overwrite each other's changes. Worktrees give each agent its own isolated copy. Agent A can edit auth.ts in one worktree while Agent B edits auth.ts in another, on different branches, without any conflicts.
Yes. When you create a new pane with worktrees enabled, Pane runs git worktree add for you, sets up the branch, copies over your env vars and node_modules, and cleans everything up when you archive the pane.
Yes. Toggle 'Use Worktrees' off in the New Pane dialog. The agent runs in your main working tree instead of an isolated branch. This is useful for quick one-off tasks where isolation doesn't matter.
Yes. Each worktree gets the full monorepo, so agents can work on different packages in parallel. Scope each agent to its package folder and they won't step on each other.
Windows SmartScreen warningDirect downloads can show a SmartScreen warning while Pane is unsigned. Pane is fully open source, so you can audit the code and build from source yourself.1. Click More info2. Click Run anyway3. Continue the installerThe PowerShell install downloads the official release directly and avoids most browser download friction.npm global install