All guides
Claude Code logo
Claude Code

Claude Code Worktrees: Multiple Agents Done Right

Claude Code worktrees and multiple agents on one laptop share a kernel and credentials. One microVM per agent is the fix. BYOK, 30-day money-back.

People searching Claude Code worktrees and Claude Code multiple agents are not looking for a git tutorial. They already know the workaround: one worktree per agent, maybe a pane per process, maybe a script that fans tasks out. What they want is the part worktrees never deliver — real isolation when several agents run at once.

The demand is product-exact

Measured US search volume puts this cluster near the top of agent-hosting demand: claude code worktrees (~720/mo), claude code multiple agents (~590/mo), git worktree claude code (~480/mo) — about 1,790/mo of people trying to run more than one Claude Code at a time. Community jargon calls the same habit agentmaxxing. The search phrase is worktrees. The product gap is isolation.

What git worktrees actually buy you

A worktree is a second (or third) checkout of the same repository. Each Claude Code instance can trash files in its tree without immediately clobbering the others' working directories. That is useful. It is also directory isolation, not tenant isolation.

Still shared on one machine:

  • One kernel — container escapes and bad sudo are host-wide problems
  • One credential plane — SSH keys, cloud tokens, and ~/.config live on the same disk
  • One blast radius — prompt injection that shells out still hits your laptop or the one shared VPS
  • One uptime story — close the lid, sleep the host, or kill the wrong process and the whole swarm dies

Worktrees solve "two agents editing the same files at once." They do not solve "I need several always-on agents that must not share a fate."

The pattern people actually run

  1. git worktree add ../feature-a … for agent A
  2. Another worktree for agent B
  3. Two terminals (or tmux panes) running claude
  4. Hope neither agent writes outside its tree
  5. Hope neither needs root, network-wide secrets, or overnight uptime

That works for a short parallel refactor. It breaks down when agents hold production credentials, run unsupervised, or need to stay up while you sleep.

One microVM per agent

jurniti Claude Code hosting is built for the multi-agent case without pretending folders are sandboxes:

  • One Firecracker microVM per agent — KVM hardware boundary, not a shared-kernel container
  • Persistent home per boxCLAUDE.md, skills, MCP config survive restarts
  • BYOK — Claude Pro/Max login or ANTHROPIC_API_KEY inside the guest; we do not proxy model traffic
  • Always-on — the agent keeps working after the laptop closes
  • Snapshot / fork — turn a known-good setup into another paid VM when you scale the herd

Parallel agents become parallel tenants, not parallel directories.

When worktrees are still fine

Pick worktrees when:

  • Agents are short-lived and supervised
  • You are the only user on the machine
  • No production secrets live in the environment
  • Directory collision is the only failure mode you care about

Pick microVMs when:

  • Agents run unsupervised or overnight
  • Keys, tokens, or customer data are in reach of the shell
  • You want two agents that can fail independently
  • You are past "two panes on a laptop" and into a small fleet

Cost honesty

Each jurniti agent is a flat monthly box, from $25/mo (or $250/year). Two agents means two boxes. That is intentional: real isolation has a real cost. Every first purchase has a 30-day money-back guarantee. No free tier, no free trial — free slots burn compute without selecting for buyers.

How to start a multi-agent setup

  1. Open Claude Code on jurniti and checkout for agent 1
  2. Repeat for agent 2 (second subscription item / VM)
  3. Point each at its own repo or branch; keep keys local to each guest
  4. Optional: snapshot a golden box and fork when the third agent looks like the first two

No worktree choreography required for isolation. You can still use git worktrees inside a single VM if one agent needs multiple checkouts — that is a repo hygiene tool again, not a security boundary.

Related reading

Frequently asked questions

What are Claude Code worktrees?
A common pattern for running multiple Claude Code agents: each agent gets its own git worktree (a separate working directory linked to the same repo). That isolates files per agent. It does not isolate kernels, credentials, or host blast radius.
Can I run multiple Claude Code agents on one machine safely?
You can run them. Safely is the open question. Worktrees and tmux give process and directory separation. They still share one OS kernel, one user secret store, and one network stack. A bad command or prompt injection still hits the same host.
How is jurniti different from git worktrees for Claude Code?
jurniti gives each agent its own Firecracker microVM — its own kernel behind a KVM boundary, its own persistent home, its own BYOK credentials. Parallel agents mean parallel boxes, not parallel folders on one laptop.
Do I need a separate Claude subscription per microVM?
You bring your own key or Claude login per box (BYOK). How you allocate Anthropic plan capacity is between you and Anthropic. jurniti does not proxy tokens or mark them up.
How much does multi-agent Claude Code hosting cost?
Each agent is a paid VM. Plans start at $25/mo per box ($250/year). First purchase carries a 30-day money-back guarantee. There is no free trial — each slot is real compute.