Run coding agents in parallel without sharing a working directory.
Parallel coding agents work when each task has a clear boundary, its own files and an obvious path back to the base branch.
Split work by independently reviewable tasks
Start with tasks you can understand and review on their own. A focused bug fix, test addition or documentation change makes a better parallel unit than a broad request that touches every layer of the same feature.
Independent tasks can still overlap. Two tasks may depend on the same interfaces, so identify shared contracts before the agents begin and merge foundational changes before work that consumes them.
Give each task a branch and Git worktree
A branch separates history, but a Git worktree also separates the working directory. With one worktree per task, two agent processes can't write into the same checkout, change the same index or replace one another's uncommitted files.
Name the worktree after the task, so the same name identifies its terminal sessions, changed files, diff and eventual merge. What a worktree is, and the commands to make one.
Watch state rather than polling terminals
A parallel workflow needs a quick answer to three questions: which agents are still running, which are waiting for a decision, and which have finished. A shared project view shows you those transitions without opening every terminal in turn.
An agent that is waiting is the expensive case. It holds up its task until you answer, so answer the waiting ones first.
Review and merge one result at a time
Review the changes against the base branch, not only the agent's last message. Three dots compare committed changes on the branch with the point where it left main:
$ git diff main...fix-flaky-poll --stat
$ git diff main...fix-flaky-pollThose commands leave out uncommitted work. In the task's worktree, check its status and review staged and unstaged changes too:
$ git status --short
$ git diff HEADOpen any untracked files that git status lists separately; git diff doesn't show their contents until you add them to Git.
Run the relevant checks, then merge the smallest dependency first. Worktrees keep the agents out of each other's files; you still need to review what each one merges.
Bring the remaining tasks up to date
Once one task has merged, the others started from an older main. Worktrees share the repository's branches, so you can see the merge from every worktree straight away. Update the next task before you review it, so its diff and its checks reflect what it will merge into:
$ cd ../atlas-add-rate-limit
$ git rebase main
$ npm testIf the rebase stops on a conflict, the two tasks overlapped. The agent that wrote the second task can usually resolve it, since it knows what its change was for; ask it to, then review the result like any other change. If you would rather keep the branch's history as it was, git merge main does the same job with a merge commit.
Try a task more than once
Parallel worktrees also let you run the same task several times, with different agents, models or prompts, and keep the best attempt. Compare the attempts' diffs, merge the one you want, and remove the other worktrees and their branches.
How ket does this
ket gives every task its own worktree, so you don't create them by hand. Its sidebar marks each agent as running or waiting across all your projects, with both counts in the header, so you can find the agent waiting on you without opening each terminal. Its Git view shows everything a worktree changed since its base in place of the diff commands above, and one merge commits the work and merges the branch into its base in your primary checkout. How ket organizes isolated worktrees.
Related guides
Run multiple Claude Code sessions in parallel.
The commands for running Claude Code sessions in parallel, each in its own worktree.
Git worktree tutorial: work on two branches at once.
What a worktree is, when it beats stashing or a second clone, and the commands to create, list, move and remove one.
Set up a Git worktree for a coding agent.
Dependencies, .env files, ports and databases: what a fresh worktree is missing and how to fill it in.