Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Cursor now natively supports git worktrees. You can run multiple agents in parallel, each with their own isolated copy of the codebase. This is great for comparing models or running the same model multiple times and picking the best result.

157,784 görüntüleme • 1 yıl önce •via X (Twitter)

47 Yorum

arun singh profil fotoğrafı
arun singh1 yıl önce

I think use cases are greatly exaggerated. It may be good for experimentation but for anything production you would not be validating multiple outputs. Worst you will find one model did something right and the other did something else right, you cant pick parts.

Lee Robinson profil fotoğrafı
Lee Robinson1 yıl önce

It's worked pretty well for us internally. I often find myself either choosing from the best run of a few agents, or pulling in one piece the others missed and merging them locally.

arun singh profil fotoğrafı
arun singh1 yıl önce

Ohhh man if merging was that easy, i hardly see code like that where you can just merge piece quickly. Great if its working for you.

Anthony Isaacson profil fotoğrafı
Anthony Isaacson1 yıl önce

this feature was kinda confusing I expected it to let me make a plan, then use multiple agents to execute parts of it repeating work with different models is more of a “test drive” vs daily driver scenario

Duncan profil fotoğrafı
Duncan1 yıl önce

been using it, works really well

Jeffrey Emanuel profil fotoğrafı
Jeffrey Emanuel1 yıl önce

I really think worktrees are a bad pattern and not worth the trouble. There are other, much better ways at getting multiple agents to work well together at the same time that don’t come with the overhead and reconciliation burden of worktrees.

Lee Robinson profil fotoğrafı
Lee Robinson1 yıl önce

If you prefer the alternative, which is running multiple agents in isolation in the cloud (virtual machines), that is a single dropdown away 😄

Jeffrey Emanuel profil fotoğrafı
Jeffrey Emanuel1 yıl önce

I prefer using my new tool, which also works with cursor, which handles the problem via agent direct communication and a system of file reservations:

Tom Bielecki profil fotoğrafı
Tom Bielecki1 yıl önce

@leerob This is an interesting comms/coordination paradigm between agents doing different tasks. But I wonder why we haven’t seen pair programming with different LLMs where they critique/review each other’s code at every step.

Jeffrey Emanuel profil fotoğrafı
Jeffrey Emanuel1 yıl önce

@leerob Yeah I agree that would be a useful workflow. I do mimic they with my agent mail system, it’s just not an explicit pairing up and it’s not in real time. I just periodically tell some of the agents to switch hats and start reviewing recent code from other agents.

Shrey Gupta profil fotoğrafı
Shrey Gupta1 yıl önce

i just tried this how can i open the worktree in the ide

Lee Robinson profil fotoğrafı
Lee Robinson1 yıl önce

For each run, you can click "apply changes"! You can also open terminals for each worktree if you want.

Shrey Gupta profil fotoğrafı
Shrey Gupta1 yıl önce

gotcha! cool the terminal helps so i can open cursor in another window but feel like there should be a simpler way if i'm already doing setup commands for new worktrees

COURT profil fotoğrafı
COURT1 yıl önce

Lee do you have something like Cursor.learn explaining worktrees? I use Git regularly but have never used worktrees. I find your style of teaching my favorite! ❤️

Lee Robinson profil fotoğrafı
Lee Robinson1 yıl önce

I'd like to make this!

Six profil fotoğrafı
Six1 yıl önce

this is great, especially as the models continue to progress and even specialize. To build on this, I'd love to have each permutation viewable in the browser so I can compare the results from a user's perspective. Thanks for continuing to make cursor an awesome tool!

Lee Robinson profil fotoğrafı
Lee Robinson1 yıl önce

This is doable, especially if you're using something like Next or Vite which have incrementing port numbers. You can open a terminal for each worktree and each has a unique port.

Six profil fotoğrafı
Six1 yıl önce

Ah, that makes sense, I'll have to give that a shot. Thanks Lee for the response, and for your great work on Cursor w/ the community.

Atlyr profil fotoğrafı
Atlyr1 yıl önce

Can I plan and give mutually exclusive work streams to different agents in parallel?

agusti profil fotoğrafı
agusti1 yıl önce

this is a fine idea but the execution feels … not there yet there should be a worktree tool the regular agent can call to reconcile and act as orchestrator/merger back otherwise you end up with 4 just slightly different implementations i literally told it to use the cli to

jason 💬 profil fotoğrafı
jason 💬1 yıl önce

model cage matches just got way more organized, no more messy terminal brawls to pick the winner

justmakexmas profil fotoğrafı
justmakexmas1 yıl önce

this was what finally got me on ultra :<

Brian Rogers profil fotoğrafı
Brian Rogers1 yıl önce

Comparing between them is something I hope you enhance. + being able to dive into a specific worktree via the IDE view so that I can poke around!

mustafa başar profil fotoğrafı
mustafa başar1 yıl önce

Does it require extra payment?

CodingCoop profil fotoğrafı
CodingCoop1 yıl önce

Agreed. Just cannot wait until the file nav and git nav in agent UI supports work trees too! 😍

murad profil fotoğrafı
murad1 yıl önce

Clearly, git worktrees make experimenting with multiple agents way more manageable.

Rajesh Sharma profil fotoğrafı
Rajesh Sharma1 yıl önce

this is a good one how to leverage this for backend projects which use docker or docker compose... where running multiple containers on the same system may run into conflicts... i also hear about remote machine support too... any guidance

Arindam Majumder 𝕏 profil fotoğrafı
Arindam Majumder 𝕏1 yıl önce

This is a Great Addition After using it on Claude code, I was thinking it would be cool to have it on IDEs as well And Cursor team might have listened that 👀

Kruxigt profil fotoğrafı
Kruxigt1 yıl önce

This is 5 months after AlchemyLab got worktrees natively by the way.

Rohit profil fotoğrafı
Rohit1 yıl önce

exactly what we wanted - you guys are killing it

arzafran profil fotoğrafı
arzafran1 yıl önce

what's the best resource on how to build agents you came through, things are changing so quick and drastically everything seems to be outdated the day it's off the press.

rohan profil fotoğrafı
rohan1 yıl önce

man i shouldve launched my tool i made for this like 3 months ago 💔

BEN SYNE profil fotoğrafı
BEN SYNE1 yıl önce

bless 🔥

zjy365 profil fotoğrafı
zjy3651 yıl önce

Parallel testing made easy, saves so much time.

Hootan profil fotoğrafı
Hootan1 yıl önce

Does this help with working on a few work items in parallel?

@moudx👨🏻‍💻 profil fotoğrafı
@moudx👨🏻‍💻1 yıl önce

Well this is great!

Dhyey Mavani profil fotoğrafı
Dhyey Mavani1 yıl önce

This is such a massive unlock. Gonna try tomorrow

Justin profil fotoğrafı
Justin1 yıl önce

next-level workflow

BenIt Pro Max Ultra profil fotoğrafı
BenIt Pro Max Ultra1 yıl önce

Cursor = SWE-AGI-1 basically, it's awesome!

pivot tables profil fotoğrafı
pivot tables1 yıl önce

Tried this and hated it. There’s no practical way to leverage this. It’s just performative so try hards can say “yeah I run 3-5 agents on all tasks and then pick the best one” It would be good for building MVP web apps, but anything in production is just silly

Andric profil fotoğrafı
Andric1 yıl önce

The workflow to verify the agent’s work in the worktree isn’t so clear however. Cursor adds a worktree in a special folder automatically but there doesn’t seem to be an easy way to switch to it as a branch to verify work in the browser on localhost.

Carlos Macias profil fotoğrafı
Carlos Macias1 yıl önce

I see this tool and just think about my account credit getting demolished 😅

David Kim 🌒 profil fotoğrafı
David Kim 🌒1 yıl önce

Can I open new terminals to test for a native mobile app?

Casey Whalen profil fotoğrafı
Casey Whalen1 yıl önce

I love the concept of seeing what different models come up with.

Stefan Marsc profil fotoğrafı
Stefan Marsc1 yıl önce

each one with custom native browser?

Stefan Marsc profil fotoğrafı
Stefan Marsc1 yıl önce

Open Terminal means then I have to start app manually for each “agent” tree and then how to handle that the browser opens that agents preview when switching between them without like manually changing url each time to adjust port?

Andrey profil fotoğrafı
Andrey1 yıl önce

top notch feature

Benzer Videolar

Claude Code has 3 models. Stop making Sonnet do Haiku’s job. Sonnet 5.5 builds. Haiku 5.5 scouts. Opus 5.5 reviews. Put them in parallel Git worktrees and let each model do what it’s best at. The setup: → Sonnet 5.5: Build features across isolated worktrees, writing code and running tests without touching your main branch. → Haiku 5.5: Explore the repo, index the AST, find dependencies, and scout for implementation paths while Sonnet codes. → Opus 5.5: Review architecture before implementation, investigate repeated test failures, and verify diffs before merging. Launch separate sessions: claude --worktree feat-auth claude -w feat-scout --model haiku Each session gets its own working directory and Git branch. Your agents can edit files and run tests in parallel without overwriting each other’s work. The full setup goes further: .worktreeinclude shares local configs across worktrees. Auto-cleanup keeps finished sessions tidy. Supervisor checkpoints catch contract drift and repeated test failures. A cwt alias makes launching new worktrees one command. Opus reviews the final diff before anything reaches main. The goal is simple: stop wasting expensive model calls on repo exploration, stop serializing work that can run in parallel, and stop merging code without a proper review. Paste the setup prompt into Claude Code. Ask it to show every config diff first, then approve the changes before anything gets edited. Build with Sonnet. Scout with Haiku. Review with Opus. Ship in parallel.

Arindam Majumder 𝕏

14,192 görüntüleme • 19 gün önce