Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In Cursor 2.5+, two rg processes are spawned on workspace open to discover AGENTS.md, CLAUDE.md, and .cursor/rules/**/*.mdc files. These processes use --follow (follow symlinks) with a hardcoded exclusion list, but do not respect search.followSymlinks: false, .cursorignore, or any user-configurable setting.
In repositories that use circular/self-referential symlinks (e.g. assemblies/topic-name/assemblies → ../../assemblies/, a common pattern in modular documentation repos), the --follow flag causes infinite directory recursion. The two rg processes each consume ~480% CPU indefinitely and never terminate, making Cursor unusable.
Exact rg invocations (from ps aux):
rg --files --hidden --no-require-git --no-config --color=never --follow \
--iglob */**/AGENTS.md --iglob */**/CLAUDE.md --iglob */**/CLAUDE.local.md \
--iglob !**/node_modules/** --iglob !**/.git/** ...
rg --files --hidden --no-require-git --no-config --color=never --follow \
--iglob */**/.cursor/rules/**/*.mdc \
--iglob !**/node_modules/** --iglob !**/.git/** ...
Suggested fixes (any of these would work):
- Honor the existing search.followSymlinks: false setting – don’t pass --follow when it’s disabled.
- Pass --ignore-file=.cursorignore so users can control what’s scanned.
- Use rg’s built-in --max-depth to cap recursion depth, since AGENTS.md / .cursor/rules/ files are never deeply nested.
- At minimum, detect and break symlink cycles (rg does not do this itself when --follow is used).
Workaround: Creating a .ignore file (respected natively by rg) in the repo root with patterns like assemblies/**/assemblies to break the circular chains. This works because the invocations do not include --no-ignore.
Steps to Reproduce
Open any repo containing circular directory symlinks in Cursor 2.5+ and observe with ps aux | grep rg. Cursor 2.4.37 does not exhibit this behavior.
Operating System
MacOS
Version Information
2.6.19 , but any 2.5+ seems to exhibit this
Does this stop you from using Cursor
Yes - Cursor is unusable