How do I run several AI agents on one project
On this page
  1. Do I need several agents, or one agent with helpers?
  2. How do I split the work so agents don't collide?
  3. How do I set up the agents?
  4. How do I review several agents' work?
  5. What does it cost?
  6. What changes on a team?
  7. Frequently asked questions
  8. How many AI agents can work on one project at once?
  9. Can different AI agents work on the same codebase?
  10. How do I stop two agents doing the same task?
  11. Should one agent manage the others?
  12. Try it with your team

Guides

How do I run several AI agents on one project?

Run several AI coding agents on one project: one task and one worktree per agent, claims before code, review by a second agent. Solo and team setups.

To run several AI coding agents on one project, give each agent its own task, its own git worktree and branch, and one shared list that says who owns what. Have each agent claim its task before it writes code, keep shared rules in one instruction file, and let a second agent review each pull request. For one person, that is a few files and a habit. For a team, where every person runs their own agent, the task list and decisions have to reach everyone's agent as they change.

Do I need several agents, or one agent with helpers?#

It depends on whose agents they are.

SituationWhat fitsWhy
One person, one big jobSubagents or Claude Code agent teamsOne lead splits the job and collects the results
One person, several separate tasksParallel sessions in worktreesEach task runs on its own branch
One person, two vendorsPlan in one agent, build or review in the otherA second model catches different mistakes
Several people, each with an agentA shared task list and decisionsThe agents belong to different people and computers

Claude Code can split work inside one session. Subagents take a focused job and report back, and agent teams, an experimental feature, let a lead session hand tasks to helper sessions that share a task list. Both work for one person. Joxo compared with Claude Code agent teams explains where the line falls.

How do I split the work so agents don't collide?#

Split by the files a task touches, not by job title. Two agents called "frontend" and "backend" still both edit the API types. Before you start, write each task as a result someone can check, and name the folders it should stay inside:

md
## Tasks
- [ ] CSV export: GET /orders.csv streams every order.
      Stays in src/export/, tests/export/. Owner: -
- [ ] Refund emails: a refunded order sends one email.
      Stays in src/mail/, tests/mail/. Owner: -
- [ ] Shared: add `refundedAt` to the Order type. Do this first. Owner: -

Tasks that change shared files, such as types, schema or the route table, go first and alone. Everything that depends on them waits until they merge. The four ways to split work between AI agents compares splitting by feature, by layer, by stage and by pipeline, and when each one goes wrong.

How do I set up the agents?#

One worktree and branch per agent, so their files stay apart:

bash
git worktree add ../shop-export -b agent/csv-export
git worktree add ../shop-mail -b agent/refund-emails

Start each agent in its own folder and give it one task:

Read AGENTS.md and TASKS.md. Claim "CSV export" by writing your name
and branch on it, commit that change, then implement it. Stay inside
src/export/ and tests/export/. Stop and ask if you need another file.

Agents that can run without a person at the keyboard can also be started from a script. Claude Code takes a prompt with claude -p, and Codex with codex exec:

bash
(cd ../shop-export && claude -p "$(cat ../prompts/csv-export.md)") &
(cd ../shop-mail && codex exec "$(cat ../prompts/refund-emails.md)") &
wait

Headless runs still need permission settings that let them edit and run tests in their folder. Check each tool's documentation before you widen them, and never in a folder that holds secrets.

How do I review several agents' work?#

One pull request per task, reviewed before merge, preferably by a different agent from the one that wrote it:

bash
cd ../shop-export
git push -u origin agent/csv-export
gh pr create --fill --draft

Then ask the other agent to read the diff against main and list concrete problems with file and line. Merge one pull request at a time, rebase the rest, and rerun the tests after each merge. Reviewing pull requests from several agents has a checklist for that pass.

What does it cost?#

Each agent runs on the plan or API key of whoever starts it. Several agents on one person's plan use that plan several times as fast. On a team, each person runs their own agent on their own subscription, and nobody should share a login: Anthropic's and OpenAI's terms both forbid making an account available to anyone else. Using your own AI subscription on a team covers what that means in practice.

What changes on a team?#

On one computer, you are the scheduler. You see every terminal, and TASKS.md is on your disk. When five people each run an agent, the task list reaches a teammate's agent only after a push and a pull, two agents can take the same task in that gap, and a decision made on one laptop sits there until it merges.

Joxo gives the team's agents one shared project instead. Each person pastes one line into their own agent, Claude Code, Codex, Cursor, OpenCode or one of the others listed on the agents page:

Read https://joxo.ai/skill.md and follow it to set up Joxo in this project.

Then:

  • only one agent can hold a task, and a second claim is refused and told who holds it;
  • a decision one agent publishes reaches every teammate's agent on its next turn;
  • a handoff carries the branch, the commit and a note, so another agent can continue the task;
  • the iPhone app, in TestFlight beta, tells each person when their own agent is waiting on them.

Worktrees, branches and pull requests stay the same. How to use Claude Code and Codex together shows where this sits among the other setups, and team collaboration with Claude Code covers the habits that matter on a team.

Frequently asked questions#

How many AI agents can work on one project at once?#

As many as you can review. Each agent adds a branch to merge and a diff to read. One person often tops out at two or three parallel tasks. A team can run more, because each person reviews their own agent's work.

Can different AI agents work on the same codebase?#

Yes. Claude Code, Codex, Cursor and others can all work in one repository if each has its own worktree and branch and they read the same rules. Keep the rules in AGENTS.md, and give Claude Code a CLAUDE.md that imports it.

How do I stop two agents doing the same task?#

Make every agent claim a task in a shared list before writing code, and refuse to start on a claimed task. With a file, the claim must be committed and pulled before the other agent sees it. A shared task board, such as Joxo's, refuses the second claim as it happens.

Should one agent manage the others?#

For one person's big job, a lead session with helpers works well, and Claude Code supports it with subagents and agent teams. Across a team, each agent belongs to its own person, so a shared list of tasks and decisions works better than one agent giving orders.