File search and global search don't work on auto selected repository

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

  1. Have multiple worktrees available
  2. Set repository folder on the bottom left to “Auto” select
  3. Select a file from a worktree that’s different from the one Cursor was opened in
  4. Confirm the repository on the bottom left auto switched to the selected worktree’s folder
  5. Search for content or files using cmd + p or cmd + shift + f
  6. Open a target file
  7. 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