Why worktrees, not clones or branches

Switching branches in one folder stops the agent that is working there. A second clone works, but it is a second repository: fetches, remotes and stashes are not shared. A worktree shares the repository's history and objects and only adds a folder with its own branch checked out, so creating one takes seconds and uses little disk.

  • Each agent edits only its own folder.
  • Builds, test runs and dev servers do not collide on output folders.
  • Each branch is reviewed and merged on its own.

By hand, with git

  1. Fetch, so the base is current

    git fetch origin in the main checkout.

  2. Add a worktree on a new branch

    Put worktrees in a sibling folder so tools that scan the repository do not find them.

  3. Start Claude Code in it

    Open a terminal in the new folder and run claude. Repeat for each task.

  4. Clean up when merged

    Remove the worktree with git, not by deleting the folder, so git forgets it.

Terminal
git fetch origin
git worktree add -b fix/invoice-rounding ../shop-worktrees/fix-invoice-rounding origin/main
cd ../shop-worktrees/fix-invoice-rounding
claude

# later
git worktree list
git worktree remove ../shop-worktrees/fix-invoice-rounding
git worktree prune

What gets hard with four or more

  • Knowing which terminal is waiting at a permission prompt, and for how long.
  • Copying .env and local config into every new worktree (see the guide on that).
  • Reviewing each branch's changes against the right base.
  • Agents left running, or processes they leaked, after you moved on.

With Ourkite Bot

Ourkite Bot does the steps above for you and keeps the result in one window: ourkite new <branch> --base origin/main creates the worktree in <repo>-worktrees, copies the files listed in .ourkite/include, opens a terminal and shows the workspace as a tile in the dock with its state. Removing refuses a worktree with uncommitted changes or a running agent.

Try the preview

The preview is shared by email while the signed installer is prepared. Tell us how many agents you run and what you would want first.

  • Windows 10 or 11, 64-bit
  • Claude Code, signed in
  • git
Join early access

Windows 10 and 11 · Claude Code · early preview