Cursor spawns hundreds of rg processes

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Description:
Using Cursor with agentic features (AI actions) causes hundreds of rg (ripgrep) processes to spawn until the system becomes unusable. This happens even without manual search. Quitting Cursor clears them.

Expected:
Agent should not trigger runaway rg processes.

Environment:

macOS Sequoia 15.7.1

Apple M3 Pro

Cursor 1.7.28

Steps to Reproduce

  • Engage with agent
  • Grind to a halt

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.28
VSCode Version: 1.99.3
Commit: adb0f9e3e4f184bba7f3fa6dbfd72ad0ebb8cfd0
Date: 2025-10-01T02:45:21.769Z
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.6.0

For AI issues: which model did you use?

4.5 reasoning

Does this stop you from using Cursor

Yes - Cursor is unusable

2 Likes

On further investigation, it appears to be worst with 4.5 thinking

I’m also experiencing this issue, but without using any “AI” features from Cursor. As soon as I focus on any tab that’s not a terminal, I see 10s of rg processes appearing and using all the CPU, making my VM unusable.

Version: 1.7.28
VSCode Version: 1.99.3
Commit: adb0f9e3e4f184bba7f3fa6dbfd72ad0ebb8cfd0
Date: 2025-10-01T02:45:21.769Z
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.6.0

In my case, it is happening when using the Remote SSH extension to a Ubuntu VM. The rg processes are being spawned on the VM.

I tried using the Extension Monitor feature, and the only one showing very high CPU usage (100%) is Built-in Extensions → <ext-host-runtime>

1 Like

hi @Joseph_Manghan @ricardo-eai Could you post a Request ID with privacy disabled so we can look into the details? https://docs.cursor.com/troubleshooting/request-reporting

@condor in my case it’s not an AI action, it happens simply by switching tab focus (I didn’t even have the Agent Chat open). My account is part of a Team Business plan, so I can’t change privacy features.

Hi all,

Thank you for this bug report.

@Joseph_Manghan, we are working on an update to limit the # of ripgrep processes we’d launch in parallel with the agent.

@ricardo-eai, could you try setting the search.ripgrep.maxThreads to 2 and see whether this helps limit the # of ripgrep threads?

@ravirahman thanks for the suggestion. It still didn’t work.

Every time I switch tabs, for each file I have open, cursor spawns multiple rg processes. Example of the processes being created (I removed some sensitive information like file paths):

/home/ubuntu/.cursor-server/bin/adb0f9e3.../node_modules/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g /<REDACTED_PATH_1>/<REDACTED_FILE_3>.md -g !\*\*/.git -g !\*\*/.svn -g !\*\*/.hg -g !\*\*/.DS_Store -g !\*\*/Thumbs.db -g !/{\*\*/node_modules,\*\*/bower_components,\*\*/\*.code-search,\*\*/.git,\*\*/.svn,\*\*/.hg,\*\*/.DS_Store,\*\*/Thumbs.db,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json} --no-ignore --follow --threads 2 --no-config
/home/ubuntu/.cursor-server/bin/adb0f9e3.../node_modules/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g /<REDACTED_PATH_2>/<REDACTED_FILE_4>.py -g !\*\*/.git -g !\*\*/.svn -g !\*\*/.hg -g !\*\*/.DS_Store -g !\*\*/Thumbs.db -g !/{\*\*/node_modules,\*\*/bower_components,\*\*/\*.code-search,\*\*/.git,\*\*/.svn,\*\*/.hg,\*\*/.DS_Store,\*\*/Thumbs.db,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json,\*\*/\*\*/.claude/settings.local.json} --no-ignore --follow --threads 2 --no-config

I believe 2 rg processes are being spawned for each open tab, each one of those processes uses 2 threads. So even with limited rg threads, it’s easy to take down the machine while rg runs.

After looking at the command, I noticed it follows symlinks. I added some folders to files.exclude that contain a lot of symlinks (i.e: bazel-* outputs). And now I don’t experience the issue of having my VM almost grind to a halt. However, I wasn’t experiencing this problem before, and I hadn’t changed any config option. I notice there’s the search.followSymlinks option, is that new or was that recently changed?

I’m having a similar issue. Not sure when it started, maybe a couple of weeks ago. Finally decided to dig into it and it’s also tons of rg processes.

This only happens in a devcontainer (Ubuntu). It seems that rg process takes much longer to run. I don’t understand why since I’m sharing my workspace and the docker image is built in the native architecture. It’s not limited by disk i/o (checked with dd).

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
58977 user 20 0 27.2g 494080 57676 S 5.3 6.2 1:07.19 node
73702 user 20 0 167104 116296 3488 S 2.3 1.4 0:01.21 rg
73688 user 20 0 167116 112124 3488 S 2.0 1.4 0:01.30 rg
73763 user 20 0 160972 108308 3488 S 2.0 1.3 0:00.89 rg
73777 user 20 0 160980 110364 3488 S 2.0 1.4 0:01.12 rg
73778 user 20 0 160972 106268 3488 S 2.0 1.3 0:01.08 rg
73792 user 20 0 160972 106264 3488 S 2.0 1.3 0:01.00 rg
73834 user 20 0 164032 110456 3488 S 2.0 1.4 0:00.89 rg
73861 user 20 0 160960 108076 3488 S 2.0 1.3 0:01.08 rg
73932 user 20 0 157900 110392 3488 S 2.0 1.4 0:00.92 rg
73946 user 20 0 157900 105972 3488 S 2.0 1.3 0:00.87 rg
73973 user 20 0 164044 110068 3488 S 2.0 1.4 0:00.81 rg
74167 user 20 0 160960 100172 3488 S 2.0 1.2 0:00.74 rg

Edit: using extension bisect (great tool!), tracked the issue to claude code extension. The issue went away after I disabled it.

3 Likes

you saved my life, thanks!
it’s indeed claude code extension in cursor caused the rg issue.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.