Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 1 год назад •via X (Twitter)

Комментарии: 47

Фото профиля arun singh
arun singh1 год назад

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
Lee Robinson1 год назад

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
arun singh1 год назад

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
Anthony Isaacson1 год назад

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
Duncan1 год назад

been using it, works really well

Фото профиля Jeffrey Emanuel
Jeffrey Emanuel1 год назад

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
Lee Robinson1 год назад

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
Jeffrey Emanuel1 год назад

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
Tom Bielecki1 год назад

@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
Jeffrey Emanuel1 год назад

@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
Shrey Gupta1 год назад

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

Фото профиля Lee Robinson
Lee Robinson1 год назад

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

Фото профиля Shrey Gupta
Shrey Gupta1 год назад

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
COURT1 год назад

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
Lee Robinson1 год назад

I'd like to make this!

Фото профиля Six
Six1 год назад

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
Lee Robinson1 год назад

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
Six1 год назад

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
Atlyr1 год назад

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

Фото профиля agusti
agusti1 год назад

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 💬
jason 💬1 год назад

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

Фото профиля justmakexmas
justmakexmas1 год назад

this was what finally got me on ultra :<

Фото профиля Brian Rogers
Brian Rogers1 год назад

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
mustafa başar1 год назад

Does it require extra payment?

Фото профиля CodingCoop
CodingCoop1 год назад

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

Фото профиля murad
murad1 год назад

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

Фото профиля Rajesh Sharma
Rajesh Sharma1 год назад

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 𝕏
Arindam Majumder 𝕏1 год назад

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
Kruxigt1 год назад

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

Фото профиля Rohit
Rohit1 год назад

exactly what we wanted - you guys are killing it

Фото профиля arzafran
arzafran1 год назад

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
rohan1 год назад

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

Фото профиля BEN SYNE
BEN SYNE1 год назад

bless 🔥

Фото профиля zjy365
zjy3651 год назад

Parallel testing made easy, saves so much time.

Фото профиля Hootan
Hootan1 год назад

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

Фото профиля @moudx👨🏻‍💻
@moudx👨🏻‍💻1 год назад

Well this is great!

Фото профиля Dhyey Mavani
Dhyey Mavani1 год назад

This is such a massive unlock. Gonna try tomorrow

Фото профиля Justin
Justin1 год назад

next-level workflow

Фото профиля BenIt Pro Max Ultra
BenIt Pro Max Ultra1 год назад

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

Фото профиля pivot tables
pivot tables1 год назад

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
Andric1 год назад

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
Carlos Macias1 год назад

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

Фото профиля David Kim 🌒
David Kim 🌒1 год назад

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

Фото профиля Casey Whalen
Casey Whalen1 год назад

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

Фото профиля Stefan Marsc
Stefan Marsc1 год назад

each one with custom native browser?

Фото профиля Stefan Marsc
Stefan Marsc1 год назад

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
Andrey1 год назад

top notch feature

Похожие видео

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 просмотров • 21 дней назад