I fired off a “Use multiple models” agent, and it created a worktree from another worktree instead of my local copy. I know because it’s referencing a method in it’s response which doesn’t exist in my local copy.
I added "git.showCursorWorktrees": true to my settings so I could see the worktrees, and I can’t delete any of them. I click the 3 dots to the right of the worktree > Worktrees > Delete Worktree and get this popup:
You cannot delete the worktree you are currently in. Please switch to the main repository first.
I have no other windows open, closed all files, and closed all agent tabs.
Nothing shows me I’m working within a worktree, or which worktree I’m in, and I have no idea how to switch in/out of them via the IDE.
Creating a basic Local agent works fine and edits my local directory as expected.
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
Does this stop you from using Cursor?
Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue
The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!
When you use multi-agent mode (Use Multiple Models), agents sometimes switch incorrectly between the worktree and the main directory when creating and applying changes. This can also block deleting worktrees through the UI.
For now, please try these workarounds:
Remove worktrees manually in the terminal: git worktree remove ~/.cursor/worktrees/[project]/[hash] (if that doesn’t work, add the --force flag)
If Cursor says you’re inside a worktree, try restarting the IDE, this often resets the state
Next time, try using Single Agent instead of Multiple Models until we fix this