How to Run Claude Code Agents in Parallel: Pick the Setup by Agent Count
Last updated
Which setup, for how many agents
How many agents run at once, and do you trust what they execute?
Read-only or separate files, and the code is yours
Subagents, or agent view
Use subagents inside one Claude Code session, or agent view to dispatch background sessions. No setup.
2 to 4 agents editing the same repository
Git worktrees and tmux
One git worktree per agent, one tmux window or terminal tab per worktree. Assign each worktree its own port and database. It is free, and it isolates files only.
5 to 20 agents, Docker, or no prompts
A container or a Docker Sandbox per agent
Free locally, paid in RAM and CPU: one copy of your environment per agent, all drawing on the same laptop. Docker Sandboxes adds a microVM per agent.
More than your laptop holds, or untrusted repositories
One VM per agent, off the laptop
Each agent gets its own kernel, its own port 3000, its own database, its own Docker daemon. What a VM doesn't change: your plan's usage limits and your review time.
4 vCPUs and 16 GB per agent are enough
Anthropic's cloud sessions
They are included in the plan you already pay for: "There's no separate charge for the cloud VM", but sessions share your plan's usage limits.
More than 15 small VMs at once today
A larger cloud provider
flockvm's one host, in France, is too small: a larger cloud provider fits better.
You can run as many Claude Code sessions in parallel as your machine and your plan allow: Anthropic publishes no cap on local sessions. What changes with the number of agents is what breaks first. Two agents in the same folder overwrite each other's files. Four agents in four worktrees fight over port 3000 and the same local database. Somewhere past that, the laptop runs out of memory, and every agent you start with --dangerously-skip-permissions can run almost anything your user account can.
This guide picks a setup by agent count, shows the commands with the output they gave when we ran them on 31 October 2026 (prompts trimmed), and says where each option stops working. The one exception is Docker Sandboxes: those commands are quoted from Docker's documentation, not run here, so they come without output.
| Agents at once | Setup | What it isolates | Cost |
|---|---|---|---|
| 2 to 4 | git worktrees + tmux, or claude --worktree |
Files only | Free |
| 5 to 20 | Dev containers or Docker Sandboxes | Files, processes, network; Docker Sandboxes adds a microVM per agent | Free locally, paid in RAM and CPU |
More than 20, or --dangerously-skip-permissions on code you don't trust |
One VM per agent, off your laptop | The whole operating system | Per-second or hourly compute, or included in your Claude plan for Anthropic's cloud sessions |
The boundaries between rows are rules of thumb, not measurements. Where your own laptop gives up depends on what the agents run, not on Claude Code itself. The protocol near the end of this guide shows how to find it.
Can you run multiple Claude Code instances at once?
Yes. Each claude process is an independent session with its own context window. Anthropic's documentation lists five built-in ways to work on several tasks at once: subagents, agent view, agent teams, dynamic workflows and projects. It also lists worktrees, which "give each session a separate git checkout, so parallel sessions each edit their own copy of the files".
The one rule that holds for all of them: two agents must never edit the same working directory. Anthropic's agent view docs put it plainly for sessions outside a git repository: they "write to the working directory directly and aren't isolated from each other". A branch is not enough either. Docker's Claude Code page says the same: "Branches alone don't isolate edits in one working directory."
Sessions can also talk to each other now. The GitHub request for "inter-session communication for multi-Claude workflows" (issue #24798, opened in February 2026) was closed in August 2026. The maintainer pointed to cross-session messaging, shipped in Claude Code v2.1.224, and to agent teams.
How many Claude Code instances can you run?
There is no published limit on how many claude processes you can start. The documented numbers are all inside one session:
- Subagents: 20 running at once per session by default. The 21st fails with
Concurrent subagent limit reached. - Dynamic workflows: up to 16 concurrent agents by default, fewer when Claude Code has fewer CPUs available.
- Agent teams: "There's no hard limit on the number of teammates", but Anthropic recommends starting with 3 to 5.
In practice, four other limits decide your number.
Your plan's usage limits
Every parallel session draws from the same account. Pro and Max plans "have a five-hour session limit and a weekly limit", shared between Claude and Claude Code. Agent view's docs do the arithmetic: "running ten agents in parallel uses quota roughly ten times as fast as running one." Agent teams cost more still: about 7 times the tokens of a standard session when teammates run in plan mode.
On 31 October 2026, Anthropic's pricing page lists Pro at $20 a month ($17 billed yearly), Max at $100 with "5x Pro usage every 5 hours and every week", and Ultra at $200 with "No 5-hour limit" for verified accounts and "10x Pro usage every week". These are usage multiples, not session counts.
How fast that goes in real use: one Hacker News user running parallel agents with tmux wrote in March 2026, "with $200 subscription, I usually hit weekly quota by around day 3-4." The GitHub issue "Instantly hitting usage limits with Max subscription" had 1,499 comments on 31 October 2026.
RAM and CPU
The claude process is not the heavy part. On the 16 GB M1 Pro MacBook this guide was written on, with Claude Code v2.1.314, a snapshot of the resident memory of every running claude process on 31 October 2026:
$ ps -axo rss=,comm= | awk '$2 ~ /\/claude$/ {print int($1/1024)}' | sort -n | awk '{a[NR]=$1} END {print NR " claude processes, RSS in MiB: min " a[1] ", median " a[int((NR+1)/2)] ", max " a[NR]}'
15 claude processes, RSS in MiB: min 55, median 105, max 218
Fifteen sessions at that median come to about 1.5 GiB (15 × 105 MiB), a tenth of the machine. The number moves with each session's history and tools; it does not include the processes the agents start.
What fills the machine is what the agents run: dependency installs, compilers, test suites, dev servers, Docker containers. Users report the same thing in their own words. One of the creators of Vibe Kanban: "I already find my macbook slowing down after 4 concurrent runs, mainly rustc." Another developer, in the Superset thread: "10 parallel rust builds would kill my computer." And one Claude Code bug report describes "~3,000 parallel bash processes in 17 seconds, causing OOM crash and hard reboot."
How many agents that leaves room for depends on your repository: a TypeScript service with a dev server and a Rust workspace with a full test suite give very different answers on the same laptop. The protocol below gives you your own number.
The claude process is not the heavy part
- median of 15 claude processes. 15 claude processes, RSS in MiB: min 55, median 105, max 218.
- 105 MiB
- for fifteen sessions at that median, about a tenth of the machine. The number moves with each session's history and tools.
- 1.5 GiB
- the machine. What fills the machine is what the agents run: dependency installs, compilers, test suites, dev servers, Docker containers.
- 16 GB
Ports, databases and services
Worktrees separate files. They don't separate anything that listens on a port or keeps state. "[T]he hard part being managing state, especially environments and ports. I've never used lsof so much in my life," as one developer put it on Hacker News in May 2026. The demo in the next section shows both failures.
Your attention
Simon Willison, who runs several agents in separate terminals, names the limit that made him skeptical at first: "the natural bottleneck on all of this is how fast I can review the results." In the Show HN thread of Superset, a terminal built to run agents in parallel, one of its developers wrote: "For bug fixes and quick changes I can definitely get to 5-7 in parallel, but for real work I can only do 2-3 agents in parallel."
Which setup for how many agents?
Two questions decide it: how many agents run at the same time, and whether you trust what they will execute.
- Do the agents only read, or work on separate files, and is the code yours? Use subagents inside one Claude Code session, or agent view to dispatch background sessions. No setup.
- 2 to 4 agents editing the same repository, with permission prompts on? One git worktree per agent, one tmux window or terminal tab per worktree. Assign each worktree its own port and database.
- 5 to 20 agents, or agents that need Docker, or that you want to run without prompts? One container or one Docker Sandbox per agent. Anthropic's own guidance: to "let Claude work unattended with
--dangerously-skip-permissionsor auto mode", start with "the preconfigured dev container, any container or VM, or the sandbox runtime". - More than your laptop holds, untrusted repositories, or agents that must keep running when the lid closes? One VM per agent, off the laptop. Anthropic again: to "work on an untrusted repository", use "a dedicated virtual machine, or a cloud session".
What each agent has of its own, and what they all still share
Worktrees and tmux
A container per agent
A VM per agent
Worktrees and tmux Its own files
One git worktree per agent, one tmux window or terminal tab per worktree.
Worktrees and tmux Ports, databases
Worktrees separate files. They don't separate anything that listens on a port or keeps state.
Worktrees and tmux Your user account
Every agent you start with --dangerously-skip-permissions can run almost anything your user account can.
Worktrees and tmux Laptop RAM, CPU
What fills the machine is what the agents run: dependency installs, compilers, test suites, dev servers, Docker containers.
A container per agent Its own processes, network
Give each agent its own environment: its own processes, its own network namespace, its own copy of the services.
A container per agent Docker Sandboxes: a microVM
Docker Sandboxes gives each agent a microVM with "its own Docker daemon, filesystem, and network".
A container per agent Laptop RAM, CPU
Its limit is the laptop: every agent's microVM, daemon and toolchain share its RAM and CPU.
A VM per agent Its own kernel, database
A VM per agent removes the machine limits from the previous sections.
A VM per agent Off the laptop
Your laptop runs only the terminal you watch them from, and the agents keep working when the lid closes.
A VM per agent Plan limits, review time
What a VM doesn't change: your plan's usage limits and your review time.
2 to 4 agents: git worktrees and tmux
This is the free setup that covers most people. Claude Code has it built in: claude --worktree feature-auth creates a worktree under .claude/worktrees/feature-auth/ on a branch named worktree-feature-auth and starts a session in it. Run the same command with another name in a second terminal for a second agent.
The manual version below gives you the same isolation with plain git, and makes visible what the built-in flag doesn't solve. Every command was run in a throwaway repository on 31 October 2026 (macOS 27.2, git 2.50.1, tmux 3.8, an empty tmux config and a plain $ prompt; the short pauses between commands are left out). Its only source file, server.js, is a Node server that listens on PORT or 3000. To avoid spending tokens, claude is replaced by echo claude in the tmux step: the agent would start in the same place.
Create one worktree per agent
$ for i in 1 2 3; do git worktree add -b agent-$i ../myapp-agent-$i; done
Preparing worktree (new branch 'agent-1')
HEAD is now at c3e50a3 init
Preparing worktree (new branch 'agent-2')
HEAD is now at c3e50a3 init
Preparing worktree (new branch 'agent-3')
HEAD is now at c3e50a3 init
$ git worktree list
/private/tmp/parallel-demo/myapp c3e50a3 [main]
/private/tmp/parallel-demo/myapp-agent-1 c3e50a3 [agent-1]
/private/tmp/parallel-demo/myapp-agent-2 c3e50a3 [agent-2]
/private/tmp/parallel-demo/myapp-agent-3 c3e50a3 [agent-3]
A worktree is a fresh checkout. Files that git ignores are not there:
$ ls -a ../myapp-agent-1
.
..
.git
.gitignore
server.js
The main checkout has a .env; the worktree doesn't. With claude --worktree, list such files in a .worktreeinclude file at the repository root and Claude Code copies them into each new worktree. By hand:
$ for i in 1 2 3; do cp .env ../myapp-agent-$i/; done
Start one tmux window per agent
One detached tmux session, one window per worktree, then the same prompt sent to each:
$ tmux new-session -d -s agents -n agent-1 -c ../myapp-agent-1
$ for i in 2 3; do tmux new-window -t agents -n agent-$i -c ../myapp-agent-$i; done
$ for i in 1 2 3; do tmux send-keys -t agents:agent-$i "echo claude \"fix issue #10$i\"" Enter; done
$ tmux list-windows -t agents -F "#{window_index} #{window_name} #{pane_current_path}"
0 agent-1 /private/tmp/parallel-demo/myapp-agent-1
1 agent-2 /private/tmp/parallel-demo/myapp-agent-2
2 agent-3 /private/tmp/parallel-demo/myapp-agent-3
$ tmux capture-pane -p -t agents:agent-2 | grep -v "^$"
$ echo claude "fix issue #102"
claude fix issue #102
$
tmux attach -t agents brings you in; Ctrl-b then a window number switches agent. Agent teams can use the same tmux for their split-pane mode, which "requires tmux, or iTerm2".
What breaks first: the port
Agent 1 starts the dev server. Agent 2, in its own worktree, does the same:
$ tmux send-keys -t agents:agent-1 "node server.js" Enter
$ tmux send-keys -t agents:agent-2 "node server.js" Enter
$ tmux capture-pane -p -t agents:agent-1 | grep -v "^$" | tail -2
$ node server.js
listening on :3000
In myapp-agent-2:
$ node server.js 2>&1 | grep -m1 "^Error"
Error: listen EADDRINUSE: address already in use :::3000
Separate files, same network. The usual quick fix, killing whatever holds port 3000, kills the other agent's server.
What breaks next: the shared database
The .env copied into each worktree points all three at the same local database, as most .env files do:
$ cat .env
DB_PATH=/private/tmp/parallel-demo/dev.db
Agent 1 runs its migration from myapp-agent-1, then agent 2 runs its own from myapp-agent-2:
$ source .env && sqlite3 "$DB_PATH" "CREATE TABLE users (id INTEGER PRIMARY KEY, email TEXT);"
$ source .env && sqlite3 "$DB_PATH" "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);"
Parse error in 2nd command line argument: table users already exists
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);
^--- error here
$ sqlite3 "$DB_PATH" ".schema users"
CREATE TABLE users (id INTEGER PRIMARY KEY, email TEXT);
Agent 2's code expects a name column; the database has agent 1's schema. With Postgres or MySQL the failure is the same, and quieter: one agent's migration or seed script changes the data the other agent's tests run against.
The fix: one port and one database per worktree
$ for i in 1 2 3; do printf "PORT=%s\nDB_PATH=/private/tmp/parallel-demo/dev-agent-%s.db\n" $((3000+i)) $i > ../myapp-agent-$i/.env; done
$ cat ../myapp-agent-2/.env
PORT=3002
DB_PATH=/private/tmp/parallel-demo/dev-agent-2.db
$ tmux send-keys -t agents:agent-1 C-c
$ for i in 1 2 3; do tmux send-keys -t agents:agent-$i "set -a; source .env; set +a; node server.js" Enter; done
$ for p in 3001 3002 3003; do echo "$p: $(curl -s localhost:$p)"; done
3001: ok
3002: ok
3003: ok
This works while each service takes a port number from an environment variable. It gets harder with docker compose stacks, fixed ports in config files, OAuth callbacks registered on localhost:3000, or a test suite that starts its own Postgres on 5432. Each of those needs its own offset, per worktree.
The cost you don't see: disk
Each worktree installs its own dependencies. On the machine this guide was written on, the node_modules of one Next.js 16 site weighs 497 MiB in 23,156 files. 35 worktrees and checkouts of that repository each had their own copy, between 468 and 497 MiB: 16.5 GiB in total, for one website (du -sm and find -type f, 31 October 2026).
Clean up
$ echo "// agent-3 change" >> ../myapp-agent-3/server.js
$ tmux kill-session -t agents
$ git worktree remove ../myapp-agent-1
$ git worktree remove ../myapp-agent-3
fatal: '../myapp-agent-3' contains modified or untracked files, use --force to delete it
$ git -C ../myapp-agent-3 status --short
M server.js
Git refuses to drop uncommitted work. It deleted myapp-agent-1 without asking, including its copied .env, because ignored files don't count as changes. claude --worktree applies its own checks when you exit an interactive session: it removes a clean worktree automatically unless you named the session, and prompts when there is work in it.
For a fuller tmux setup, with one window per agent and one worktree per window, see Claude Code in tmux.
Should you use agent teams or subagents instead?
They solve coordination, not isolation, and they run on the same machine.
- Subagents do side tasks inside one session and return a summary. Up to 20 at once by default. They can each get a worktree with
isolation: worktreein their definition. - Agent view (
claude agents, research preview) dispatches background sessions and shows which ones need you. A dispatched session moves into its own worktree before it edits files. Its sessions "run on your machine" and "stop if the machine shuts down." - Agent teams have a lead that splits work across teammates with a shared task list. They are experimental and disabled by default: set
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1to turn them on. Anthropic's advice is to give each teammate a different set of files: "Two teammates editing the same file leads to overwrites." And "if the lead runs with--dangerously-skip-permissions, all teammates do too."
None of them changes the port, database or memory limits above. Tools such as Conductor, Superset or Claude Squad add an interface on top of worktrees; see parallel agent orchestrators compared.
5 to 20 agents: containers or Docker Sandboxes
Past a handful of agents, or as soon as you want to drop the permission prompts, give each agent its own environment: its own processes, its own network namespace, its own copy of the services.
Dev containers
Anthropic publishes a reference dev container with an egress firewall script, init-firewall.sh. Because it runs Claude Code as a non-root user in the container, the docs say "you can pass --dangerously-skip-permissions for unattended operation." They also warn that when executed with --dangerously-skip-permissions, "dev containers do not prevent a malicious project from exfiltrating anything accessible inside the container, including the Claude Code credentials stored in ~/.claude." One container per agent means one copy of your environment per agent, all drawing on the same laptop.
Docker Sandboxes
Docker Sandboxes gives each agent a microVM with "its own Docker daemon, filesystem, and network". It runs through the sbx CLI; Anthropic's docs describe it as "a free, standalone product from Docker that does not require Docker Desktop". It runs on macOS 14 or later on Apple silicon, Windows 11 (x64, with Windows Hypervisor Platform) and Ubuntu 24.04 or later with KVM. Three properties matter for parallel agents:
- Clone mode (
--clone) gives each agent "a separate Git clone inside the sandbox" instead of your working tree; its changes "stay there until you fetch them or the agent pushes them". Run it from the main checkout: Docker rejects clone mode from inside a git worktree other than the main one. - API keys stay on the host. With a key stored through
sbx secret set anthropic, the agent sees a sentinel value and a proxy on the host swaps in the real key after the request leaves the microVM. With a Claude subscription, you run/logininside the sandbox, but Docker says the session token "stays on your host and is never stored inside the sandbox." Network policy presets such as Balanced and Locked Down filter where agents can connect. - Without arguments, the sandbox starts
claude --dangerously-skip-permissions.
The cost: "Multiple sandboxes don't share images or layers", and each one is a VM plus a Docker daemon on your laptop.
The workflow for two agents, as Docker documents it (usage and Claude Code pages, read on 31 October 2026). We have not run it, so there is no output; the sandbox names agent-1 and agent-2 replace Docker's my-sandbox:
# Excerpt from Docker's documentation, not run for this guide
$ sbx create --clone --name agent-1 claude .
$ sbx create --clone --name agent-2 claude .
$ sbx ls # see what's running
$ sbx run --name agent-1 # attach, one terminal per agent
$ git fetch sandbox-agent-1 # from the host, review a branch
$ git diff main..sandbox-agent-1/<branch>
$ sbx rm agent-1 # drops the in-sandbox clone
Fetch or push what you want to keep before sbx rm: removing a clone-mode sandbox deletes its clone. Inside a sandbox, Claude Code's agent view still needs one worktree per background session; Docker's page says the --clone flag doesn't create them.
Of the local options in this guide, Docker Sandboxes isolates the most. Its limit is the laptop: every agent's microVM, daemon and toolchain share its RAM and CPU. Docker also offers cloud sandboxes, which run on Docker-managed infrastructure and are managed separately from local ones; when the laptop runs out, Docker Sandboxes alternatives compares what to move to. For how the isolation compares to Firecracker microVMs, see Firecracker sandboxes; for the risks of skipping prompts, see running --dangerously-skip-permissions safely.
More than 20 agents, or --dangerously-skip-permissions: one VM per agent
A VM per agent removes the machine limits from the previous sections. Each agent gets its own kernel, its own port 3000, its own database, its own Docker daemon. Your laptop runs only the terminal you watch them from, and the agents keep working when the lid closes. An agent running without prompts can still leak what is inside its VM, such as an API key or a git token, but your laptop's files, keys and other projects are not in that VM. What a VM doesn't change: your plan's usage limits and your review time.
Anthropic's sandbox guide recommends this for untrusted code: "A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware." Your options:
- Anthropic's cloud sessions.
claude --cloud "Fix the flaky test in auth.spec.ts"starts a session in "an isolated, Anthropic-managed VM", and each--cloudcommand creates another one. Ceilings: approximately 4 vCPUs, 16 GB of RAM and 30 GB of disk. "There's no separate charge for the cloud VM", but sessions share your plan's usage limits. - Docker cloud sandboxes: the same
sbxworkflow on Docker-managed infrastructure, without host mounts or--clone. - Cloud development environments such as GitHub Codespaces or Ona (formerly Gitpod), compared for agents in GitHub Codespaces alternatives and flockvm vs Ona.
- Your own VMs: one cloud instance or VPS per agent, set up with your scripts. The Claude Code integration guide covers installing and logging in Claude Code inside a VM.
- Sandbox providers built for agents, compared in E2B alternatives, E2B vs Daytona and Docker Sandboxes alternatives. Platforms such as Northflank also run coding agents, each in its own microVM, next to services and databases; see flockvm vs Northflank.
- flockvm, below.
When the free or included options are the better choice
Be honest with yourself about the number. If you review the work of 2 or 3 agents a day, worktrees and tmux cost nothing and solve the problem: give each one a port and a database. If you need isolation from your own machine for a handful of agents, Docker Sandboxes is free and keeps your API key or Claude login out of the sandbox. If 4 vCPUs and 16 GB per agent are enough and your code can run on Anthropic's infrastructure, Anthropic's cloud sessions are included in the plan you already pay for. If you need more than 15 small VMs at once today, flockvm's one host, in France, is too small: a larger cloud provider fits better. A separate VM service earns its place when you need your own environment (services already running, your own Docker images, more memory), more agents than your laptop holds, or control over where the code runs.
Where flockvm fits today
flockvm runs each coding agent in its own Firecracker microVM. Sign-ups are open (Google, GitHub or an email link), with a 7-day free trial: card required, nothing charged for 7 days, cancel anytime. Today it does:
- boot a VM to
sshdin about a second; - pause a VM with a snapshot of its memory, and resume it with its processes still running;
- bill by the second;
- run up to 15 small VMs at once today on one host in France (OVHcloud), shared by all customers, 2 VMs at once during the trial; swarms of 10 to 20, forked from one prepared environment, are what flockvm is building next. Amsterdam and three US regions are planned, not live.
The parallel agents guide in the docs has the scripts: create the VMs, fan one task out over SSH, collect the branches.
What it doesn't do yet: no fork of a prepared environment into N VMs, no SDK (there is a REST API, a CLI and an MCP server), no public status page. Claude Code signs in inside each VM, with /login or your organization's API key, so the credential lives in the VM, where you can revoke it; it is not held outside it by a proxy, as Docker Sandboxes does for API keys. Forking one prepared environment into many agents is what flockvm is building next. For what stays in the EU and what doesn't (your prompts still go to Anthropic's API), see EU data residency.
If you are past what your laptop holds, start a 7-day free trial, or read how the coding agent swarm workflow is meant to work.
How do you find your own laptop's ceiling?
No published number will match your repository, so measure it. A protocol you can run in an afternoon:
- Fix the machine. On mains power, nothing else heavy running. Write down the model, RAM, OS and Claude Code version.
- Pick a real repository with a dev server, a database and a test suite.
- Give each agent the same job in its own worktree: install dependencies, start the dev server on port 3000 + N, run the tests, then one short, identical
claude -pprompt on the same model. - Start 1, 2, 4, 6, 8, 10 and 12 agents together, three runs each.
- Record every 5 seconds: memory pressure (
memory_pressureon macOS,free -mon Linux), swap in use (sysctl vm.swapusage), load average, the memory of each agent's process tree, the duration of each install and test run, and every error. - Call it saturated at the first N where the median test run takes more than twice as long as with one agent, or swap passes 1 GB, or macOS reports memory pressure as "warn".
- Check
/usagebefore and after, to see how much of your 5-hour window one round used.
Run it once with worktrees and once in containers or Docker Sandboxes: the second run shows what the isolation costs you in memory on the same laptop.
To turn the result into a budget for one VM per agent, multiply N by the hours they run and by a provider's hourly or per-second price; Docker Sandboxes alternatives lists dated prices.
Does running agents in parallel make you faster?
Only if you can review what comes back. The two practitioners quoted above land on the same point: the machine scales, the reviewer doesn't. Parallel agents pay off most on independent tasks with a clear test (bug fixes, dependency upgrades, migrations split by module), and on running several attempts at the same task to keep the best diff, a pattern covered in best-of-N for coding agents. They pay off least on one large feature, where agents step on each other's files and you spend the saved time merging.
Summary
- Claude Code has no published cap on local sessions. Your plan's usage limits, your RAM, your ports and your review time set the real number.
- 2 to 4 agents: one worktree each (
claude --worktreeorgit worktree add), one tmux window each, and a separate port and database per worktree. - 5 to 20 agents, or no permission prompts: a dev container or a Docker Sandbox per agent. Docker Sandboxes adds a microVM and keeps API keys and the Claude login on the host.
- Beyond that, or untrusted code: one VM per agent, off the laptop: Anthropic's cloud sessions, your own VMs, or a sandbox service such as flockvm.
- Measure your own ceiling with the protocol above before buying anything.
Run your agents in their own microVMs
flockvm gives each coding agent a Firecracker microVM that pauses with its memory and resumes, billed per second. France is live, and you can start with a 7-day free trial.
Start your 7-day free trialCard required. Nothing charged for 7 days.