Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In a multi-root workspace, Cursor’s internal search/grep tool (used by Agent, Composer, and other AI features) ignores the path parameter and spawns a separate rg (ripgrep) process for every workspace root folder. This makes even simple, tightly-scoped searches extremely slow – often timing out or taking minutes – because every workspace folder is traversed in parallel regardless of the requested search scope. It will also return results from ALL workspace folders rather than the one targeted.
Steps to Reproduce
- Open a multi-root workspace in Cursor containing many repositories (e.g., 10+ folders, with multiple large codebases of 7,000+ source files).
- Start an Agent or Composer chat session.
- Ask the agent to search for a specific string in one particular repository (e.g., “search for SomeClassName in my-repo”).
- Observe that the Grep tool call specifies a path scoped to only that one repository folder.
- The search either takes minutes or times out/aborts entirely.
- For comparison, run the same search manually in a terminal using Cursor’s bundled ripgrep:
“\resources\app\node_modules@vscode\ripgrep\bin\rg.exe” “SomeClassName” “\my-repo\src” --stats
This completes in approximately 3 seconds as opposed to minutes. (relative to your repositories, of course)
Expected Behavior
When the Grep tool is called with a path parameter pointing to a specific folder or subfolder, only the workspace root that contains that path (or just that subtree) should be searched. Cursor should not fan out across all workspace roots. A search scoped to a single repository should complete in seconds (matching raw rg performance), not minutes.
Operating System
Windows 10/11
Version Information
Cursor IDE 2.5.26
Additional Information
Having multiple large repositories/folders in my workspace is important to my workflow in order to be able to cross references code and documentation that are in different repositories.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor