Agent having serious issues with search / grep / glob for files.
Steps to Reproduce
Make a repo with levels of submodules, use it like normal, wait for Cursor to automatically update and break itself. Notice that the agent can’t find any files, and that your only option now is to spend your time filing a bug report and manually downgrading and removing the extra broken tiles from your macOS dock
Expected Behavior
The agent can search for files. Note: I ran an audit to make sure the .gitmodules are wired correctly and they are. Also, note that before I open the .gitmodules file in my IDE, the IDE does not recognize the folders as submodules (no blue S shown on the folders)
Hey, thanks for the report. Glob and rg return zero results for files inside submodule directories, even though ls shows them. This looks like a bug in how the agent tools handle git submodules, most likely ripgrep is treating submodule contents as gitignored.
Passed it to the team. Can you also send the request ID (Chat menu > Copy request ID)?
As a workaround, the agent can fall back to shell commands (ls, cat, grep via the terminal). You can add something like this to .cursor/rules:
When searching for files in this project, prefer using terminal commands (ls, find, grep)
instead of the built-in glob/grep tools, as this repo uses nested git submodules
which the glob tool currently doesn't handle correctly.
Not ideal, but it should help until the issue is fixed. Let me know if you need anything else.