Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
The agent Glob tool is documented as a filename search (“find files by name patterns”) and prints “total N files” as if the list were complete. It is not a filename search. It is implemented as a Grep files_with_matches call (rg -l --iglob PATTERN). Ripgrep therefore silently omits files it treats as non-text (NUL bytes) and empty files. Agents then conclude those files do not exist. (Note: real uses cases for cursor often has nothing to do with writing code. It is just another general agentic harness - but much better for collaborating with agents rather than just instructing them.)
NOTE: This is not the closed thread Glob is not a replacement for find . That was dismissed as expected index ignore-list behavior, with a suggestion to add !*.pdf to .cursorignore. That explanation is false. Cursor’s ignore-files docs mark that list as indexing only. Glob is not using it.
Proof it is not an extension denylist, not Dropbox, and not the index ignore list: a UTF-8 file named textfile.pptx is found; a .py file containing a NUL is omitted; empty .py and .txt are omitted; the same split reproduces on C:\temp\glob-repro, which is not Dropbox, not a git repo, and not the workspace. If the index ignore list (*.pdf, *.pptx, *.png) were applied, textfile.pptx and textfile.pdf would be missing but they are not.
The LS tool documents that it hides dotfiles. Glob does not document such a filter, then claims a complete count. This confuses agents all the time.
Steps to Reproduce
Steps to Reproduce
The files are already at C:\temp\glob-repro (12 files): Recreate if needed:
textfile.md, textfile.py, textfile.pptx, textfile.pdf, README: UTF-8 text binaryfile.py, binaryfile.md: bytes hello + NUL + world empty.py, empty.txt: zero bytes real.pptx, real.pdf, real.png: binary headers
In a terminal: dir /b C:\temp\glob-repro Result: 12 files.
In the agent, Glob target_directory C:\temp\glob-repro pattern */ Result: total 5 files. Kept: README, textfile.md, textfile.py, textfile.pdf, textfile.pptx. Omitted: binaryfile.py, binaryfile.md, empty.py, empty.txt, real.pptx, real.pdf, real.png.
Optional: Glob pattern *.pptx on the same folder. textfile.pptx is found; real.pptx is still omitted. The name by itself is not what causes the filtering.
Expected Behavior
Glob matches file names, as its schema says, or it states that it only returns files ripgrep treats as text and does not print “total N files” for a filtered set.
Actual: dir sees 12 files; Glob reports total 5 files. Agents treat that as an inventory.
Minimum fix: document the text-only/ripgrep behavior in the Glob tool schema; in the result, say files were skipped, or stop saying total N. Correct fix: implement Glob with rg --files so it matches the tool name and description.
Operating System
Windows 10/11
Version Information
Version: 3.10.20 (user setup)
VS Code Extension API: 1.125.0
Commit: 23b9fb205fe595ea2be29da7214e19762d037fc0
Date: 2026-07-07T07:03:33.071Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
All models
Does this stop you from using Cursor
No - Cursor works, but with this issue