Zoes Download

Blog · Guide

How to run multiple Claude Code agents in parallel

To run multiple Claude Code agents in parallel, give each agent its own git worktree so they edit separate checkouts on separate branches. You can do this by hand with git worktree add, or use Zoes, a free MIT Mac app that creates the worktree, starts the session, and shows which agent needs you.

This guide does it by hand first, so you know what is going on underneath. Then it shows the same method in Zoes, which takes over the bookkeeping.

Why parallel Claude Code agents collide

Open two terminals in the same repository, start claude in each, and give them two different tasks. They now share one working tree and one branch:

  • Both agents edit the same files on disk. One agent's half-finished change is in the other agent's build and test run.
  • A commit from one agent can pick up the other's edits.
  • If one agent switches branch, the other agent's files change under it.
  • When you review, git diff shows both tasks mixed together.

A second clone of the repository avoids this, but it is a second copy of the history to fetch and keep in sync. A git worktree is lighter: another checkout of the same repository, in its own folder, on its own branch.

The method: one git worktree per agent

By hand

From your repository, add one worktree per task. Each gets a new branch:

cd ~/code/app
git worktree add -b fix-login ../app-fix-login
git worktree add -b search-index ../app-search-index

Then start one Claude Code session in each folder, in its own terminal:

cd ~/code/app-fix-login && claude
cd ~/code/app-search-index && claude

Each agent now has its own files and its own branch. The commits land in the same repository, so you push and open pull requests as usual. When a task is merged, remove its worktree:

git worktree remove ../app-fix-login

A new worktree holds only committed files. Before the agent starts, install dependencies and copy any untracked config, such as .env, into it. Otherwise the agent's first test run fails for reasons that have nothing to do with the task.

Check Claude Code's own options

Claude Code changes often. Before you build scripts around it, read the Claude Code documentation for the worktree options in the version you run. The plain git commands above work with any version, and with any other agent.

What you still track by hand

Worktrees fix the collisions. They don't tell you what is happening. With three or four agents going, the work moves to bookkeeping:

  • Which terminal is waiting on a permission prompt, and for how long.
  • Which agent finished while you were looking at another one.
  • What each one changed, which means a git diff in each folder.
  • The setup steps for every new worktree, and the cleanup after merge.
  • The terminals themselves. Close the wrong window and the agent in it stops with it.

Zoes is free and MIT licensed, with no account and no paid tier.

Star Zoes on GitHub Download for Mac

Doing it in Zoes

Zoes is a desktop app for macOS 13 or later, with unsigned builds for Linux and Windows. It runs the Claude Code you already installed and signed in to, with the same worktree-per-agent method. The steps below are covered in more detail in Start an agent in a new worktree.

Create a worktree from a branch or a pull request

  1. Add your repository as a project: click the folder button at the top of the sidebar's projects list, then Add project….
  2. Press ⌘⇧N, or click the + on the project's row. The new session page opens with Worktree picked.
  3. To start from a branch other than the default, click the branch chip and pick one. Branches only on the remote show as origin/<name>.
  4. To start from a pull request instead, click the pull request button next to the branch chip and enter 123, #123, or the pull request URL.
  5. Type the prompt and press Return.

Zoes fetches the latest changes, creates the git worktree, copies configuration, runs setup, and starts the agent, showing each step. New worktrees go in ~/.zoes/worktrees/<project>/<name> unless you pick another folder in Settings › Projects. To start every new session in a worktree, set Settings › Agents › New sessions › Runs in to Worktree.

First-run setup with .zoes/config.json or .zoes/setup.sh

Commit the setup steps with the repository, and every new worktree runs them before the agent starts:

{
	"setup": ["pnpm install", "cp .env.example .env"]
}

Or put a script at .zoes/setup.sh. Before setup, Zoes copies the project's root .env* files into the new worktree, and a .worktreeinclude file lists other untracked files to copy. If setup fails, the agent doesn't start and the terminal stays open so you can read why.

Status at a glance

Each session shows one of five statuses: Working, Needs you, Done, Failed, or Idle. Claude Code reports its status both as a chat and in a terminal, where it reports through Claude Code hooks.

  • Needs you, Failed, and Done show in the sidebar, the Inbox, the Dock badge, and macOS banners.
  • A banner for a permission request has Allow and Deny and stop, so you can answer without switching sessions.
  • ⌘J goes to the next session that needs you. Activity lists every session across projects by status.

The full table is in Sessions and status.

Review the diff and commit beside the session

The Changes panel shows the worktree's diff next to the session that made it. Switch its scope from Uncommitted to a branch to see everything the worktree changed, as a pull request would. Commit, or use Commit, push and create PR. Once a pull request exists, its card shows checks, review, and merge. A failed check has Send, which hands its log to the agent. See Review and commit an agent's changes.

Close the window, agents keep running

A Go background service, pocketd, owns the terminals and sessions. The window only shows them. Close it and every agent keeps working. On macOS, closing the window leaves Zoes running in the background by default, so the Dock badge and banners still tell you when to come back. More in Keep coding agents running after you close the window.

The desktop app, the daemon and the CLI are all in one public repository.

Star Zoes on GitHub

Mixing Claude Code with Codex and other agents

The same project can hold sessions of different agents, each in its own worktree. Zoes runs ten agent CLIs: Claude Code, Codex, Cursor, Grok Build, OpenCode, Pi, omp, fx, Hermes Agent, and Antigravity. Claude Code and Codex run in a real terminal or as a chat and report their status from both. The other eight report it from a chat. The supported agents page lists each command and its sign-in step.

A Claude Code chat can also hand work to other sessions through pocketd's orchestrator, for example: "Split this into three parts and delegate each one to its own session. Use Codex for the tests." Each delegated session runs in its own new worktree by default. See Let a chat delegate work to other sessions, and the Codex version of this guide, Run multiple Codex CLI agents in git worktrees.

If you are comparing apps for this, Zoes vs Conductor and the roundup of seven tools lay out the differences.

FAQ

Can two Claude Code agents work on the same repo at once?

To run multiple Claude Code agents in parallel, give each agent its own git worktree so they edit separate checkouts on separate branches. You can do this by hand with git worktree add, or use Zoes, a free MIT Mac app that creates the worktree, starts the session, and shows which agent needs you.

Do I need a separate branch for each Claude Code agent?

For agents in separate worktrees, yes: git checks a branch out in one worktree at a time. In Zoes, a new worktree starts on a new branch of the same name. If you want an agent on your current branch instead, pick Local, which shares the project's checkout and branch.

How do I know when a Claude Code agent needs my input?

Zoes sets the session to Needs you when Claude Code waits on a permission, a question or a dialog. The session gets an amber dot in the sidebar, goes into the Inbox, counts on the Dock badge, and shows a macOS banner. In a terminal session, Claude Code reports this through its hooks, so trust the folder in Claude.

Can I start a Claude Code agent from a pull request?

Yes. On Zoes's new session page, click the pull request button next to the branch chip and enter 123, #123 or the pull request URL. The session starts in a new worktree based on that pull request.

Do Claude Code sessions keep running if I close Zoes's window?

Yes. pocketd, Zoes's background service, runs the sessions, so agents keep running after the window closes. On macOS, closing the window leaves Zoes running in the background by default, so the Dock badge and notifications stay.