Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When you have multiple worktrees available and select a file in a certain worktree via the changes tab, then the search tool (via cmd + p) or global search (cmd + shift + f) don’t search in the autoselected worktree.
One can see the autoselected worktree change in the bottom left but all searched files and content belong to the default worktree, which makes parallel working harder.
Steps to Reproduce
- Have multiple worktrees available
- Set repository folder on the bottom left to “Auto” select
- Select a file from a worktree that’s different from the one Cursor was opened in
- Confirm the repository on the bottom left auto switched to the selected worktree’s folder
- Search for content or files using
cmd + porcmd + shift + f - Open a target file
- Bug: Observe that the selected repository on the bottom left changed back to the default repository
Expected Behavior
File and global search should search inside the auto selected repository, not the default repository.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.0.34
VSCode Version: 1.99.3
Commit: 45fd70f3fe72037444ba35c9e51ce86a1977ac10
Date: 2025-10-29T06:51:29.202Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue