Agent grep / glob returning zero results

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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)

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.5.26
VSCode Version: 1.105.1
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0
Date: 2026-02-26T04:57:56.825Z (2 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Yes - Cursor is unusable

It seems the cursor 2.3 release is the first one without glob search issues in the transcript

2.4 and 2.5 are both broken for me

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.

1 Like

May be related (haven’t followed up or verified anything)

Just noticed Gitlens / Gitkraken had an issue with submodule detection too