When your project grows, a single AI doing one thing at a time falls short — you want to move faster and try several things at once. Here's the trick the people who build seriously use (and that we use): you open SEVERAL AI sessions in parallel, each in its own isolated version of the project. One builds a feature, another fixes something else, another tries a new idea — the three advancing at the same time, without stepping on each other and without touching your main version. And each one, when it's done, gets audited with the C-A-R protocol and merged into the project only once it turned out flawless. Result: you move three times as fast, with a safety net. These live copies are called worktrees, and with Claude inside VS Code creating one is a single command. Here you'll understand the benefit, how it works without the jargon, and the prompt to set it up.
The moment arrives when your project grows and a single AI, doing one thing at a time, isn't enough anymore. You want to move faster: while one session builds a feature, another fixes a bug and a third tries out a new idea — all at once. It also shows up when you're torn between two paths ("should I do it this way or that way?") and want to see both before deciding. Or when you want to try something risky without touching what already works. In every one of those cases, going one thing at a time on your single version is slow and fragile.
In the GitHub guide you saw branches: parallel copies of your project. A worktree takes that one step further: it lets you have several of those branches open and live at the same time, each in its own folder, without one touching the other. While one AI works on "idea A", another can be on "idea B", and your main version stays untouched. It's not one at a time — it's all of them at once.
Claude Code has an official VS Code extension (it also works in Cursor and compatible editors). From there you open several AI sessions in parallel, each in its own worktree, and you see the changes it proposes with a visual diff (side by side) that you approve or reject. Best of all: creating an isolated worktree is a single command.
claude --worktree mi-idea-arriesgada
That creates an isolated copy of your project (at .claude/worktrees/mi-idea-arriesgada/) on a new branch, without touching your main version. You work the idea there; if it works out, you merge it in; if not, you delete it and nothing happened. You can open another session with claude --worktree otra-idea and have the two competing at the same time.
This is the biggest benefit, and it's exactly how we build: instead of a single AI advancing single-file, we have several sessions working in parallel, each in its own worktree. Session 1 builds one part of the product, session 2 puts together something else, and a session 3 could be trying out a new idea — the three advancing AT THE SAME TIME, without stepping on each other. It's like having three employees instead of one, each at their own desk, out of each other's way.
Inside VS Code, when the AI wants to change a file, it shows you a side-by-side comparison: what was there vs. what it's proposing. You decide: accept, reject, or tell it what to change. Nothing gets modified behind your back. It's like having your employee show you every change before applying it, instead of touching everything and letting you find out afterward.
Copy it and paste it to your coding agent so it guides you to work on several fronts at once, without you having to learn any commands:
I want to move faster on my project by working across SEVERAL sessions in parallel, each in its own isolated version (worktree), without them stepping on each other or breaking my main version. Guide me in simple language, assuming I don't know git. 1. Explain in one sentence what a worktree is (a live, isolated copy of my project). 2. I'm going to work on these fronts at once: [list your tasks, e.g.: "1) redesign the home page, 2) fix login, 3) try a new idea"]. Create a dedicated worktree for each one, branching from my stable version. 3. Tell me how to open VS Code in each worktree to see the diff and approve/reject the changes visually. 4. IMPORTANT RULE: each session must push to ITS OWN branch, NEVER to the main one (main). The main branch only receives things via merge. 5. When I finish a task in its worktree, before merging it: apply the C-A-R protocol to it (audit, debug, leave it flawless). Only then merge that branch into the main one, and resolve any conflict in plain language. 6. If an idea didn't pan out, help me discard its worktree without my main project ever noticing. Golden rule: I move in parallel, but only audited work enters the main branch, via merge — never half-done.
Join 4,200+ builders. No credit card. Build your first app with AI in minutes.