Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Agent Grep & Glob tools return empty for every query (ripgrep engine is healthy) — macOS
Summary
In the agent, the built-in Grep (content search) and Glob (file search) tools return zero results for every query, including patterns that obviously match. Meanwhile Cursor’s own indexing and rules-loading — which use the same ripgrep/ripwalk engine — work fine, ripgrep runs correctly from the CLI, and the Read/Shell tools work. The failure persists across Reload Window, full quit + relaunch, and a Cursor version update. This points to a defect in the cursor-agent-exec Grep/Glob tool path, not ripgrep, ignore files, repo-block, or workspace root.
Environment
- Cursor:
<fill from Cursor → About Cursor>(VS Code base1.93.0; agent-exec Nodev22.22.1) - OS: macOS
26.5(build25F71), Apple Silicon (arm64) - Workspace: single folder (monorepo),
/Users/<me>/phacet/devenv/web-apps - Bundled ripgrep:
…/Cursor.app/Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg→ripgrep 15.1.0-cursor5, 8,539,888 bytes, mode 100755,rgPathExists: true - System ripgrep also installed:
/opt/homebrew/bin/rg→ripgrep 15.1.0
Symptoms
- Glob →
Result of search in '<dir>': 0 files foundfor, e.g.:*.tsin a directory containing 11.tsfiles;**/cell.service.tsrepo-wide;**/*.mdcunder.cursor/. - Grep →
No files with matches foundforCellServicein a directory where 3 files contain it.
Reproduction
- Open a workspace folder on macOS (Apple Silicon).
- In the agent, call Glob with
*.tstargeting a directory that contains.tsfiles →0 files found. - Call Grep for a string that exists →
No files with matches found. - Persists after Developer: Reload Window, full Cmd+Q relaunch, and updating Cursor.
Evidence
Engine + binary are healthy (only the agent tools fail):
- CLI, using the exact flag set agent-exec builds, returns files (both bundled fork and Homebrew rg):
rg --files --hidden --no-require-git --no-config --color=never --iglob '**/cell.service.ts' <repo> # → 2 files
- agent-exec startup diagnostics: rg healthy, workspace correct, and no errors logged during the failing calls:
[info] rg_diagnostics.startup {"rgPath":".../@vscode/ripgrep/bin/rg","rgPathExists":true,"rgIsFile":true,"rgFileSize":8539888,"arch":"arm64","nodeVersion":"v22.22.1", ...}
[info] cursor_agent_exec.startup.workspace_paths {"workspacePaths":["/Users/<me>/myrepo"]}
- Cursor’s own rules service used the same ripwalk/rg engine at startup and succeeded:
[info] LocalCursorRulesService load completed {"ruleCount":19} # walks **/*.mdc
- Indexer was actively completing file jobs throughout.
Key diagnostic — the tools never spawn ripgrep:
- I temporarily replaced both the bundled
rgand the PATHrgwith a logging shim (forwarding to the real binary). During Grep/Glob tool calls the shim logged zero invocations, yet the tools still returned a normally-formatted0 files found/No matches. So the tool path returns empty without executing (or without consuming the output of) ripgrep via either resolvable binary.
Ruled out
- Not ignore files: no
.cursorignore/.cursorindexingignore;.gitignorewouldn’t exclude.ts/.mdc, and CLI rg with the same flags returns them. - Not repo/admin block or privacy: Read and Shell tools work, and those handlers enforce the same
isRepoBlockedgate (would otherwise returnadminBlock: "Team repo blocklist"). The exact files Glob can’t find are readable via Read. - Not workspace root: logged
workspacePathsis correct; an explicit absolutetarget_directoryalso returns 0. - Not a transient/degraded state: persists after full quit + relaunch and a version update.
Additional observations (for triage)
- At session start there was no ripgrep on PATH (only the bundled copy) and both tools failed. After
brew install ripgrep(rg now on PATH), the Grep tool began returning correct results in the same session without a reload — suggesting the tool path resolves ripgrep via PATH rather than the bundledrgPathit logs. However, Glob never recovered, and after restart + update (with rg on PATH) both fail again — so there may be a second, independent defect. If PATH resolution is intended, the tools should fall back to the bundled binary when system rg is absent. - In
cursor-agent-exec, the Grep/Glob tool name + handler is selected by model/agent version (e.g.,glob_file_searchvsGlob; handlersPtevsLte). If handler selection is keyed on a version string that isn’t matched as expected for a given agent/model, the search may not run. (Speculative.) - Separate minor quirk: in the agent’s Shell tool, a bare leading
rgcommand is executed asgrep(rg --versionprintsgrep (BSD grep, GNU compatible)), even thoughtype/command -v/readlinkresolvergto real ripgrep. Only the agent Shell layer is affected; the user’s own terminal runs real rg. Likely unrelated, flagging for completeness.
Workaround
- Shell
rg --files -g '<glob>'(Glob replacement) andrg -l '<text>'/rg -n '<text>'(Grep replacement);Readfor file contents.
Questions for the team
- Does the agent Grep/Glob tool resolve ripgrep via PATH or the bundled
rgPath? If PATH, why no fallback to the bundled binary? - Why does the same ripwalk/rg engine succeed for indexing/rules but the agent Grep/Glob tools return empty (no rg spawn, no error)?
- Is the version-gated handler selection (
Pte/Lte) a factor for this agent/model?
Steps to Reproduce
- Open a workspace folder on macOS (Apple Silicon).
- In the agent, call Glob with
*.tstargeting a directory that contains.tsfiles →0 files found. - Call Grep for a string that exists →
No files with matches found. - Persists after Developer: Reload Window, full Cmd+Q relaunch, and updating Cursor.
Operating System
MacOS
Version Information
Version: 3.6.21 (Universal)
VS Code Extension API: 1.105.1
Commit: e7a7e93f4d75f8272503ecf33cedbaae10114a10
Date: 2026-05-28T21:45:36.072Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.220
OS: Darwin arm64 25.5.0
For AI issues: add Request ID with privacy disabled
ca43f662-3e9a-4eaf-999f-77ff63042c38
Additional Information
I am stepping out of cursor for now, every ai models spends 100k tokens on the start of each conversation blocking on this bug.
Does this stop you from using Cursor
Yes - Cursor is unusable