Skip to content

Parallel coding agents

Run Claude Code in parallel — without losing track.

Open several Claude Code or Codex sessions side by side, or give each agent its own copy of the project in one step. lpm shows which one is working, which needs you and which is done — and keeps every diff one shortcut away.

Compare the three ways

An illustration of one lpm window with five coding agents at once. The selected project, shop-api, is split into two panes: Claude Code is working on a login rate limit, and Codex is waiting for approval to run a command. The sidebar lists shop-api with two copies and a Git worktree beneath it, each with its own agent marked working, done or problem and how long it has been at it. The prompt box under Claude Code has its send menu open on Run in duplicates, set to three runs.

Two agents split side by side in one project, three more in its copies and worktree — and a new prompt about to run three ways. Every row says what its agent is doing and for how long.

Three ways

Three ways to run Claude Code in parallel

They differ in one thing: whether each agent gets a folder of its own. Pick by task; lpm does all three in one window.

⌘T⌘D

Same folder

Tabs and splits in one project

New tab or split right

Open another agent tab, or split the pane to watch two at once. Every agent works in the same folder, on the same branch, beside the same running dev server.

Use it when

  • The tasks touch different files
  • One agent writes while another reviews or answers questions
  • You want no setup at all

Two agents editing the same file overwrite each other.

A copy per agent

Duplicates

Right-click a project → Duplicate

Make 1 to 50 standalone copies at once, fast on APFS. Each copies the project folder — uncommitted work, .env files and node_modules included — and gets its own Git repository.

Use it when

  • You want several attempts at one task and keep the best
  • The agent needs your local setup to run and test
  • Your changes aren’t committed yet

Copies take disk space as they drift from the original.

A branch per agent

Git worktrees

Right-click a project → New Worktree

Create 1 to 50 linked worktrees, each on its own lpm/<name> branch from the current commit and sharing your repository’s history. For Node projects, lpm can install dependencies in each one.

Use it when

  • Each task should end as its own branch and pull request
  • Your work is committed
  • You want a clean checkout without local leftovers

Uncommitted work, .env files and node_modules stay behind.

At a glance

Own folder per agent

Tabs & splits
No — one shared folder
Duplicates
Yes
Worktrees
Yes

Uncommitted work

Tabs & splits
Shared as you go
Duplicates
Copied, or committed only
Worktrees
Left behind

.env and node_modules

Tabs & splits
Shared
Duplicates
Copied
Worktrees
Left behind; Node install optional

Git

Tabs & splits
Same checkout and branch
Duplicates
Own repository, same branch
Worktrees
New lpm/<name> branch

Ports, databases, Docker

All three
Shared

Removing it

Tabs & splits
Close the tab
Duplicates
Deletes the folder
Worktrees
Deletes the folder and branch

None of the three gives an agent its own ports, database or Docker — more on that under honest limits.

Every isolation detail, and what Claude Code and Codex create on their own: Git worktrees for AI agents

Watch it

One project, several copies, an agent in each

A short lesson from the lpm series: duplicate a project and send the same prompt to an agent in every copy.

  1. 1

    Right-click the project, choose Duplicate

    Or start from the prompt you are writing: open the menu beside Send and pick Run in duplicates.

  2. 2

    Set the count and what runs in each copy

    An action such as Claude or Codex, or any shell command, plus the prompt to send it. Label the copies and group them in a sidebar folder if you like.

  3. 3

    Confirm, then watch them work

    The copies appear in the sidebar — under the original, or in the folder you named — and each agent reports its state as it goes.

Every lpm lesson on YouTube
Fan out

Send one prompt to many runs

Start parallel work from wherever the idea is: the prompt box, a live conversation, or the sidebar.

Run in duplicates

In the menu beside Send, choose Run in duplicates and pick 2 to 10 runs. The prompt runs in this terminal and in fresh copies of the project, each with its own agent. Nothing starts until you confirm.

A task for every copy

When you duplicate a project or create worktrees, queue work in each new copy: an action, a shell command, or a prompt for an agent, with images if you like. Use one task for all of them, or a different one for each.

Fork a conversation

Fork session continues a Claude Code or Codex conversation in a new tab while the original stays as it was. Fork into copy continues it in a fresh copy of the whole project.

Send to another tab

Hand the prompt you wrote to any tab in this or another open project — to run right away, or to land in that tab’s input for a last edit.

Labels, folders and statuses

Name each copy, group a batch under a sidebar folder, and tag copies In progress, Review or Blocked so a stack of attempts stays readable.

Copies on another Mac

Connected a second Mac that has the same project? Choose which Mac each copy is created on — it’s made from that Mac’s own version of the project and shows up in your sidebar.

Keep track

Know which agent needs you without opening every tab

Every Claude Code and Codex session reports its own state, so you see it in the tab, the sidebar and Activity.

An illustration of the Activity view: five agents across a project, its two copies and a worktree, sorted with the one that needs you first, then a problem, two working and one done, each with how long it has been in that state.
  • State on every tab and sidebar row

    Working shimmers, Needs you pulses amber, Done turns blue and a Problem shows red. Sidebar rows and tab tooltips add how long it has lasted, like “Working 2m 30s” or “took 4m”. Fold a project’s copies away and its row still sums them up.

  • Activity: every Claude Code and Codex session on one screen

    Press ⌘⇧A to list them all across your projects and copies, waiting ones first. Filter to needs you, problems, working or done, move with j and k, and press Enter to jump to the tab.

  • A chime, a banner, a push

    Hear a sound when an agent finishes, needs approval or hits an error, and get a macOS banner naming the tab and project when lpm isn’t in front. Pair the free lpm link iPhone app and the same moments arrive as push notifications.

  • Pace your plan

    Parallel runs share your plan limits. A sidebar meter shows your 5-hour or weekly window, with a marker for how much of it has passed. Codex works right away; Claude needs a one-click opt-in. More on usage and limits.

Review and ship

Compare the runs. Ship the one you keep.

Every copy and worktree is a project of its own, with the same review and Git tools as the original.

  1. Step 1

    Read every diff⌘⇧R

    Open any copy and see all of its uncommitted changes as one scrolling stack of diffs, split or unified. Fix a line right in the diff before you commit.

  2. Step 2

    Commit or open a PR with AI

    Have your own agent CLI write the commit message from the diff, or run Auto Create PR: commit, push and an AI-written pull request in one step, on a new branch if you’re on the default one.

    Pull requests need GitHub and the gh CLI.

  3. Step 3

    Delete the rest

    Remove the attempts you don’t keep. A copy’s folder is deleted from disk; deleting a worktree deletes its branch too, so push anything you want first.

How reviewing agent changes works in lpm

From the terminal

Script the fan-out, or let an agent do it

The lpm command line tool drives the same app, so every copy it makes shows up in the sidebar with live status.

Terminal
# three copies, each starting Claude Code on the same prompt
lpm duplicate -n 3 --command claude --prompt "Rate-limit the login route"

# or three worktrees on their own lpm/ branches, with Codex
lpm worktree -n 3 --command codex --prompt "Rate-limit the login route"

# another agent tab in the project you are in
lpm run --command claude --prompt "Write tests for the rate limiter"

# who is working, who is waiting
lpm status

# block until one copy's agents stop working
lpm wait shop-api-Xq4t7B --agent --timeout 1800
  • Built for scripts

    Add --json for machine-readable output. Inside an lpm terminal or a project folder the project name is optional, and lpm list shows every project and copy by name.

  • The app does the work

    Commands that create or change something need lpm running on your Mac. Up to 50 copies or worktrees per command.

  • Agents can do it themselves

    Install the lpm skills once and your agent can make its own copies, kick off work in each and wait until they settle. That works in Claude Code, Codex, Gemini CLI and OpenCode. Connect your agents.

Honest limits

What running agents in parallel won’t fix

Worth knowing before you start five at once.

Ports, databases and Docker are shared

A copy is a separate folder, not a separate machine. Two copies running the same dev server both want the same port, so run one at a time or give each its own port. At start, lpm names whatever holds a declared port and, by default, asks before stopping it. Migrations in one copy hit the same local database as the rest.

Live status is Claude Code and Codex only

Gemini CLI and OpenCode run fine in tabs, copies and worktrees, but only Claude Code and Codex send lpm their Working, Needs you and Done states, and only they get the sounds, banners, pushes and forking.

Every run uses your own plan

lpm doesn’t host a model or sell tokens. Each session runs on your own Claude Code or Codex sign-in, so every extra run spends from the same limits.

Worktrees start clean

A worktree carries committed files only; .env files, node_modules and uncommitted work stay behind. It needs the project folder at the root of a Git repo that already has a commit, and deleting a worktree in lpm also deletes its branch. Use a duplicate when the agent needs your local state.

Copies need a local project on disk

SSH projects can’t be duplicated or given worktrees. On APFS a copy is near-instant and shares unchanged data at first; on other file systems it is a full copy.

Review is still the bottleneck

Starting ten runs is one click. Reading ten diffs isn’t. Start as many as you will actually review.

FAQ

Running Claude Code in parallel, answered

  • How do I run multiple Claude Code sessions at once?

    In lpm, press ⌘T for another terminal tab or ⌘D to split the pane, and start Claude Code in each; those sessions share the project folder. When the sessions might edit the same files, give each its own folder instead: right-click the project and choose Duplicate for full copies, or New Worktree for Git worktrees on their own branches.

  • Can two Claude Code agents work in the same folder?

    Yes, as long as they touch different files. Both agents read and write the same working tree, so two edits to one file overwrite each other, and both share one branch and one running dev server. For overlapping tasks, give each agent a copy or a worktree.

  • Should I use a copy or a Git worktree for each agent?

    Use a copy (Duplicate) when the agent needs your current state: uncommitted work, .env files and installed dependencies come along, and each copy gets its own Git repository. Use a worktree when each task should end as its own branch: it starts clean from the current commit on a new lpm/<name> branch and shares your repository's history.

  • How do I send the same prompt to several agents?

    Write the prompt in the input under the terminal, open the menu beside Send and choose Run in duplicates. Pick how many runs you want; the prompt runs in the current terminal and in fresh copies of the project, and nothing starts until you confirm. From a script, lpm duplicate -n 3 --command claude --prompt followed by your prompt starts the same prompt in three new copies.

  • How do I know which agent needs me?

    Claude Code and Codex tabs show Working, Needs you, Done or Problem, and so do the rows under each project in the sidebar, with how long each state has lasted. Press ⌘⇧A for Activity, every Claude Code and Codex session across your projects, waiting ones first. lpm also plays a sound, shows a macOS banner when it isn't in front, and can push to your iPhone through the lpm link app.

  • Does running agents in parallel use more of my plan?

    Yes. Each session runs on your own Claude Code or Codex sign-in and spends from the same limits; lpm hosts no model. The Usage window shows your 5-hour and weekly windows for Codex, and for Claude once you switch it on, and a sidebar meter keeps one of them in view with a marker for how far into the window you are. For Claude Code you can also pin a different account to each project.

  • Do parallel copies get their own ports and databases?

    No. lpm separates files, not runtime resources: copies and worktrees share your Mac's ports, local databases and Docker. If a service's declared port is already taken when you start a project, lpm shows what holds the port and, unless you chose otherwise for that service, asks before stopping it.

  • Does it work with Codex, Gemini CLI or OpenCode?

    Codex gets the same live status, alerts, resume and fork support as Claude Code. Gemini CLI and OpenCode run in tabs, copies and worktrees like any terminal command, but without live status or alerts.

Start them all. Know which one needs you.

lpm is a free, open-source Mac app. Run as many Claude Code and Codex sessions as you can review, fan one prompt out to copies or worktrees, and check what each run changed before you ship it.