What does it mean to run AI agents in parallel?
Running AI agents in parallel means having two or more coding agents — for example Claude Code, Codex and Gemini CLI — work at the same time on the same repository, each on its own task or on its own attempt at the same task. Instead of waiting for one agent to finish before starting the next, you start them all and review the results as they come in.
The agents do not need to be different. Several sessions of the same CLI work just as well, which is the usual starting point for people who want to run multiple Claude Code sessions.
Why run AI coding agents in parallel?
You run agents in parallel because a single agent is sequential, and most of your time with one agent is spent waiting. Parallel agents turn that waiting into throughput.
- Ship more tasks at once — a bug fix, a small feature and a test sweep can all run while you review the first one that finishes.
- Race attempts — send the same prompt to three agents and keep the best diff. Where they agree, the answer is probably right; where they split, you found the hard part.
- Separate roles — one agent builds while another reviews or writes tests in its own workspace.
- Use your subscriptions fully — if you pay for more than one agent, parallel work lets you use them side by side instead of picking one.
What goes wrong when you run agents in parallel?
Almost everything that goes wrong comes from agents sharing things they should not share: files, branches, terminals and your attention.
- Same files — two agents in one folder overwrite each other's edits. Neither agent knows the other exists.
- Same branch — commits from different tasks mix, and one agent's half-finished work breaks another agent's tests.
- Same ports — two dev servers try to bind the same port, and one of them fails.
- Missing setup — a fresh checkout has no
node_modules, no.envand no build cache until you recreate them. - Terminal chaos — a dozen windows, and you cannot tell which agent is waiting for an answer.
- Review pile-up — five diffs arrive at once. Without a review flow, the fastest path is to merge without reading.
- Usage limits — several agents on the same account draw from the same allowance and can hit rate limits sooner.
What are the ways to run agents in parallel?
There are two practical approaches: wire it up by hand with git worktrees and a terminal multiplexer, or use an ADE that does the wiring for you. Both rely on the same foundation — a separate git worktree per agent.
The manual approach looks like this for every task:
# one worktree + branch per task
git worktree add ../app-fix-login -b fix-login origin/main
git worktree add ../app-billing-tests -b billing-tests origin/main
# recreate what git does not track
cp .env ../app-fix-login/ && (cd ../app-fix-login && npm install)
# one tmux window per agent
tmux new-session -d -s agents -c ../app-fix-login 'claude'
tmux new-window -t agents -c ../app-billing-tests 'codex'
# later: review, merge, clean up
git -C ../app-fix-login diff origin/main
git worktree remove ../app-fix-login| Step | Manual (git worktree + tmux) | ADE (Tallos) |
|---|---|---|
| Create an isolated workspace | git worktree add with a path and branch name | Click + on the repo, name the task, pick the start point |
Copy .env, install deps | By hand or a script per repo | Shared paths, a .worktreeinclude file and setup hooks run on every new worktree |
| Start the agent | Open a pane, cd, type the command | Pick the agent when you create the workspace |
| Know who needs you | Check each pane | Status per session: working, waiting on you, done, idle, plus a notification when an agent finishes |
| Review | git diff in a terminal | Diff view with line comments sent back to the agent in one batch |
| Ship | Commit, push and open the PR yourself | Commit, push and open a PR from the workspace |
| Clean up | git worktree remove and delete the branch | Delete the workspace; worktree and branch go with it |
| Coordinate agents | You are the coordinator | Optional squads: a leader agent dispatches members and reports back |
The manual approach is a good way to learn how it works — the git worktrees for AI agents guide covers it in depth. It gets expensive past three or four agents, when the bookkeeping becomes the job.
Is there a faster way than setting up worktrees by hand?
Yes. An ADE creates the worktree, launches the agent and tracks its state for you. In Tallos, a new parallel task is a name, a start point and an agent.
Run your first three agents in parallel. Tallos runs on macOS and Windows.
How do I run agents in parallel in Tallos, step by step?
Here is the full loop in Tallos, from an empty app to a merged pull request, using three agents on three tasks or three attempts.
- 1
Connect your agents
Open Settings → Connections. Install the agents you use with the vendor's own command, sign in or save an API key, and see each agent's models.
- 2
Add your repository
Add a local checkout. Tallos picks up your default branch as the base every new workspace starts from.
- 3
Create the first workspace
Click + next to the repo, name the task, choose the start point and the agent. Optionally link a GitHub, GitLab, Linear or Jira item. Tallos creates a real git worktree and branch in the background.
- 4
Give the agent its task
Supported agents open in a chat view by default. Type the prompt, drop in files or screenshots, and let it work. Switch to the raw terminal whenever you want.
- 5
Repeat for each agent
Create a second and third workspace — different tasks, or the same prompt with a different agent to race them. Each one is isolated.
- 6
Watch them side by side
Drag tabs to split panes so you can see several agents, a dev server and a browser at once. Status icons show who is working and who needs you.
- 7
Answer what needs you
When an agent is waiting on a question or permission, it is marked as needing you. Answer, and it continues.
- 8
Review each diff
Open the diff for a finished workspace. Comment on lines, then send all notes back to the agent at once. Repeat until it is right.
- 9
Ship the winner
Commit, push and open a pull request from the workspace. Delete the workspaces you do not need; the worktree and branch go with them.
Prefer the keyboard or want an agent to do it? The tallos CLI creates the same workspaces:
tallos worktree create --name fix-login --agent claude --prompt "Fix the login race condition"
tallos worktree create --name fix-login-2 --agent codex --prompt "Fix the login race condition"Learn more about how isolation works in parallel workspaces and how to read an agent's changes in diff review.
How many AI agents can you run in parallel?
You can run as many agents as your machine, your usage limits and your review time allow — and review time usually runs out first. A practical start is two or three agents, growing as your review habits keep up.
- Machine — each workspace may run its own dev server, tests and build. Heavy projects can move to a bigger machine through remote workspaces over SSH.
- Usage — every agent uses your own subscription or API key. Tallos shows usage and rate-limit windows for supported agent accounts.
- Review — a diff you do not read is a risk. Add agents only as fast as you can review what they produce.
What comes after running agents in parallel?
The next step is letting an agent coordinate the others. A squad is a leader agent that splits an objective across member agents, each in its own worktree, checks their work in rounds and hands you a final report to accept or discard.
The “3 attempts, pick the best” template is parallel racing with a judge: three members attempt the same objective and the leader recommends one with its reasons. By default a squad runs up to 4 members at once for up to 5 rounds, and you can raise that to 12 members and 20 rounds. See the best-of-three squad.
Frequently asked questions
Can I run two Claude Code sessions on the same repo at the same time?
Yes, as long as each session works in its own git worktree. In the same folder they overwrite each other's changes; in separate worktrees they each have their own branch and files.
Do I need git worktrees to run agents in parallel?
You need some form of isolated checkout, and git worktrees are the lightest one because they share the repository history. Tallos creates a worktree for every task automatically.
Is tmux enough to run AI agents in parallel?
tmux handles the terminals, not the isolation, status or review. Combined with git worktrees it works well for a few agents; an ADE adds status tracking, diff review and cleanup on top.
How do I stop parallel agents from using the same port?
Run each dev server on its own port, set per workspace through environment variables or your framework's port flag. Each Tallos workspace has its own terminals, so each server stays with its task.
Will running agents in parallel hit my rate limits faster?
It can, because parallel agents on the same account share one allowance. Spread work across the agents you have access to and watch usage; Tallos shows usage and rate-limit windows for supported accounts.
How do I merge the results of parallel agents?
Review each workspace's diff, keep the ones you want and open a pull request from each winning branch. Delete the rest; in Tallos that removes the worktree and its branch.
Does Tallos work on Windows for parallel agents?
Yes. Tallos runs on Windows 10 or later and on macOS 13 or later, with the same workspaces, terminals and review flow.