New in Cursor! · Full changelog · Main announcement
We’ve redesigned how you work with worktrees and compare model results for the same task in Cursor.
What’s changed
Worktrees are now driven by two explicit commands: /worktree and /best-of-n. This gives you more control over when work moves into an isolated checkout, and worktree management is fully agentic from there.
/worktree starts an isolated Git checkout for the rest of a chat. Your main branch stays untouched until you apply the result back with /apply-worktree.
/worktree fix the failing auth tests and update the login copy
/best-of-n runs the same task across multiple models at once, each in its own worktree. A parent agent provides commentary on the different results so you can pick the best one, or ask it to merge parts of different implementations into a single commit.
/best-of-n sonnet, gpt, composer fix the flaky logout test
Customize worktree setup for your project with .cursor/worktrees.json, including OS-specific commands for installing dependencies, copying environment files, and running migrations.
Note: If you had agents previously running in worktrees, those chats will still work. You’ll need to use the new commands for new agents.
Learn more: Worktrees documentation