# Alternatives to git worktrees for Claude Code: six other ways to run parallel sessions

<!--
title: "Alternatives to git worktrees for Claude Code: six other ways to run parallel sessions · Cork"
description: "Worktrees are the default way to run parallel Claude Code sessions, not the only one. One checkout with branches sorted at commit time, subagents, agent teams, full clones, cloud sandboxes, and a shared checkout with a coordination layer: what each isolates, what it costs, and when to pick it."
canonical: "https://corkcli.com/blog/git-worktrees-alternatives-claude-code"
last_updated: "2026-11-18"
published: "2026-11-18"
author: "Kevin Vera"
-->

Worktrees are the default way to run parallel Claude Code sessions, not the only one. One checkout with branches sorted at commit time, subagents, agent teams, full clones, cloud sandboxes, and a shared checkout with a coordination layer: what each isolates, what it costs, and when to pick it.

By Kevin Vera · November 18, 2026 · [Alternatives](https://corkcli.com/blog/c/alternatives) · 7 min read

[Git worktrees](https://corkcli.com/blog/git-worktrees-parallel-ai-coding-agents) are the standard answer to running several Claude Code sessions on one repository, and Claude Code builds them in with `claude --worktree`. They keep each session's files apart. They don't keep the sessions' work apart, and each one needs its own install, ports and database. That is why teams look for something else. Trigger.dev's CTO, explaining why they stopped: "When we tried worktrees for parallel Claude Code sessions, we spent more time on setup than shipping code."

These are the alternatives. Each one isolates something different, so the right one depends on which problem you actually have.

## The alternatives at a glance

| Option | What it keeps apart | What it doesn't | Main cost | Best when |
|---|---|---|---|---|
| Git worktrees (the baseline) | Each session's files and branch | Merges, runtime (ports, databases), shared `.git` and user config | An install and build per worktree; disk | Few sessions, small repo, independent tasks |
| One checkout, branches sorted at commit time (GitButler) | Commits and branches | Files: every session edits the same working directory | Learning GitButler's `but` CLI; same-file edits get messy | A big monorepo where a second install is the pain |
| One session with subagents | Context: each subagent has its own | Nothing on disk unless subagents run in worktrees | More tokens per task than one agent | One task you can split into independent parts |
| Claude Code agent teams | Sessions, with a shared task list and messages | Merges, unless each teammate gets a worktree | Experimental; more tokens than one session | One person directing a crew of sessions |
| Full clones | Everything git: files, branch, `.git`, locks | Runtime, unless each clone gets its own | The most disk; clones drift apart until fetched | Git lock races or tools that dislike worktrees |
| Cloud sandboxes | Files and runtime: each task runs in its own VM or container | Merges; the sandboxes can't see each other | Setup scripts, cloud cost, slower feedback | Long autonomous tasks; per-branch environments |
| Shared checkout plus a [coordination layer](https://corkcli.com/blog/coordination-layer-ai-coding-agents) (Cork) | Nobody's edit is lost: overlapping writes are held, renames are flagged | Runtime: one checkout shares ports and databases | Another tool; agent hours past Free | Agents and people who touch the same code |

## One checkout, branches sorted at commit time

GitButler can keep several branches applied to one working directory at once and decide at commit time which change belongs to which. Trigger.dev runs "a single Claude Code session with the GitButler skill loaded. Claude makes changes across packages, then splits them across branches at commit time." GitButler also offers [Claude Code hooks](https://corkcli.com/blog/claude-code-hooks-pretooluse-posttooluse-team-workflows) that do it per session, leaving "one commit per chat round, and one branch per Claude Code session."

It removes the second install and the disk cost entirely, since there is one checkout. Trigger.dev's own caveat: "If Claude (or multiple agents) modify the same file for different branches, things get messy. Virtual branches share the physical working directory." Compared side by side: [Cork vs GitButler](https://corkcli.com/blog/cork-vs-gitbutler).

## One session with subagents

Instead of several sessions, run one and let it hand parts of the task to subagents. Each subagent gets a fresh context, and Claude Code can give each one its own temporary worktree "so parallel edits don't conflict." This fits a single task with independent parts. It costs more than you might expect: in one developer's test of 35 runs, a team of subagents produced the same quality as one agent with skills at 62% higher cost. Details: [one agent vs a team of subagents](https://corkcli.com/blog/single-agent-vs-subagents-claude-code-test) and [subagents vs parallel sessions](https://corkcli.com/blog/claude-code-subagents-vs-parallel-sessions).

## Claude Code agent teams

Agent teams run several Claude Code sessions that share a task list and message each other directly, directed by a lead session. They are "experimental and disabled by default," and Anthropic's docs note they "use significantly more tokens than a single session." They coordinate one person's sessions. They don't decide where the files live, so teams that want isolation still pair them with worktrees. Compared in detail: [Cork vs Claude Code agent teams](https://corkcli.com/blog/cork-vs-claude-code-agent-teams).

## Full clones

`git clone` the repository once per session. Each clone has its own `.git` directory, so nothing contends for one set of locks, and tools that don't understand worktrees behave normally. You pay for it in disk, and the clones only see each other's commits after a push and a fetch. Merges work exactly as they do with worktrees.

## Cloud sandboxes

Hosted agents run each task in its own environment. Claude Code on the web runs each session in an isolated VM inside a configurable cloud environment, and branch preview environments (Upsun, Vercel, Railway and others) give each branch its own running copy of the app. This is the only option on the list that isolates the runtime as well as the files: no shared ports, no shared database. The sandboxes still can't see each other's work, so the conflicts arrive at the pull request. See [Cork vs Claude Code on the web](https://corkcli.com/blog/cork-vs-claude-code-on-the-web).

## A shared checkout plus a coordination layer

Let the sessions share one checkout, or keep your worktrees, and add a layer that makes them aware of each other. This is what Cork does:
- Its hooks report every write as it happens.
- The [write gate](https://corkcli.com/blog/write-gate) holds an edit against code another agent is changing right now, until the agent has the other's version.
- A rename or signature change becomes a [semantic lint](https://corkcli.com/blog/semantic-lint) finding for the agents that use it.
- Each agent gets a briefing on the code it is about to touch.
- Landing rebases onto teammates' commits, reruns the tests and pushes.

It works across Claude Code, Codex and Cursor, and on the paid plan across teammates' machines.

It doesn't isolate the runtime. Sessions in one checkout share ports and a database, so for apps that need a full stack per task, combine it with worktrees or sandboxes. Cork is free on one machine. The cloud plan includes 10 agent hours a month on Free, then $20 a month for 100 agent hours, pooled across the workspace.

## How to choose

- **Setup and disk are the problem:** one checkout, with GitButler or with Cork.
- **Ports and databases are the problem:** cloud sandboxes or per-branch preview environments.
- **Git lock races or worktree-unaware tools:** full clones.
- **One big task:** subagents, or an agent team.
- **Agents (or people) keep changing the same code:** none of the isolation options helps, because the conflict is in the work, not the folders. Use a coordination layer, with or without worktrees. What still breaks with worktrees alone: [parallel Claude Code agents: what still breaks](https://corkcli.com/blog/parallel-claude-code-agents-what-still-breaks).

## Sources

Checked 18 November 2026:

- Eric Allam, "We ditched worktrees for Claude Code. Here's what we use instead", Trigger.dev, 16 April 2026: https://trigger.dev/blog/parallel-agents-gitbutler
- Scott Chacon, "Managing Multiple Claude Code Sessions Without Worktrees", GitButler blog: https://blog.gitbutler.com/parallel-claude-code
- Claude Code docs, "Run parallel sessions with worktrees": https://code.claude.com/docs/en/worktrees
- Upsun, "Git worktrees for [parallel AI coding agents](https://corkcli.com/blog/parallel-ai-coding-agents)": https://developer.upsun.com/posts/ai/git-worktrees-for-parallel-ai-coding-agents
- u/Sufficient-Storage87, the 35-run subagents test, r/ClaudeCode, 12 November 2026: https://www.reddit.com/r/ClaudeCode/comments/1xuqnnc/i_tested_anthropics_one_agent_with_skills_beats_a/

## Frequently asked questions

### What can I use instead of git worktrees for Claude Code?

GitButler's single checkout with branches sorted at commit time, subagents in one session, Claude Code agent teams, a full clone per session, cloud sandboxes, or one shared checkout with a coordination layer such as Cork. Each isolates something different; pick by the problem you have.

### Can several Claude Code sessions share one checkout safely?

Not on their own: without coordination, one session can overwrite another's work in the same file. With GitButler, edits are sorted into branches at commit time, but same-file edits for different branches get messy. With Cork, an edit against code another session is changing is held until that session's version is in.

### Which option isolates ports and databases?

Only cloud sandboxes and per-branch environments isolate the runtime. Worktrees, clones and shared checkouts all share the machine's ports and local databases unless you configure each copy separately.

### Do any of these remove merge conflicts?

No option makes two changes to the same code compatible. Isolation postpones the conflict to the merge; coordination surfaces it while the agents are still working, when it is cheaper to fix.

## Related reading

- [Cork vs Superconductor: a hosted agent workspace, or coordination for the agents you run](https://corkcli.com/blog/cork-vs-superconductor): Cork vs Superconductor: Superconductor runs coding agents in cloud sandboxes for teams. Cork stops parallel agents from overwriting each other's code.
- [Best Claude Code agent teams alternatives in 2026](https://corkcli.com/blog/claude-code-agent-teams-alternatives): Claude Code agent teams alternatives as of October 2026: subagents, worktrees, Conductor, GitButler, MCP Agent Mail, Multica, and Cork for coordination.
- [Cork vs Claude Code on the web: where agents run, or how they share one codebase](https://corkcli.com/blog/cork-vs-claude-code-on-the-web): Cork vs Claude Code on the web: one runs Claude Code sessions in Anthropic's cloud, the other keeps parallel agents from colliding on shared code.
- [Cork vs AQ: a shared cloud workspace, or a coordination layer for the agents you already run](https://corkcli.com/blog/cork-vs-aq): Cork vs AQ: AQ hosts multiplayer cloud workspaces for coding agents. Cork coordinates the agents you already run so they stop overwriting each other.

[All articles](https://corkcli.com/blog.md) · [Cork in Markdown](https://corkcli.com/index.md) · [llms.txt](https://corkcli.com/llms.txt)

This page in HTML: https://corkcli.com/blog/git-worktrees-alternatives-claude-code
