Cursor Agent Grep returns no results. Fix Instant Grep indexing
When Cursor Agent Grep or Glob returns empty results, turn off Settings → Indexing & Docs → Index Repositories for Instant Grep and reload. With that setting off, search falls back to direct ripgrep. Also check for a parent `.git` (for example `~/.git`) and `.cursorignore` / `.gitignore` rules that hide the paths you expect. Short answer: 5 steps. 1) Confirm Instant Grep is what Agent is using; 2) Disable Index Repositories for Instant Grep and reload; 3) Check for a parent .git that poisons the index; 4) Audit .cursorignore and .gitignore; 5) Attach the path with @ if you still need one file.
Last updated: · This page is the decision checklist; the tools list for “Fix Cursor Instant Grep empty results” is a separate URL.
How do I fix this: Cursor Agent Grep returns no results?
Confirm Instant Grep is what Agent is using
Cursor Agent searches with Instant Grep (local regex search) plus normal file reads—not the old cloud semantic index. Official search docs: https://cursor.com/docs/agent/tools/search . If Grep/Glob keep returning “no results” while a terminal `rg` finds the same string, the local index path is the usual culprit.
Disable Index Repositories for Instant Grep and reload
Open Cursor Settings, search for “Index Repositories for Instant Grep”, and turn it off. Then run Developer: Reload Window (Cmd/Ctrl+Shift+P). Cursor staff document that with the setting on, Agent can route searches through an indexed backend that returns empty without falling back to direct ripgrep; disabling it forces direct search. Forum: https://forum.cursor.com/t/index-repositories-for-instant-grep-is-broken/162160
Check for a parent .git that poisons the index
A `.git` directory above your workspace (commonly `~/.git` from dotfiles versioning) can make Instant Grep index the wrong tree and return nothing useful. Run `ls -d ~/.git 2>/dev/null` and remove or relocate a mistaken parent repo, then reload Cursor.
Audit .cursorignore and .gitignore
Instant Grep respects `.gitignore` and `.cursorignore`. Over-broad patterns hide source from Grep/Glob. A `!` negation in `.cursorignore` also cannot reliably re-include a `.gitignore`-excluded file while Index Repositories for Instant Grep is enabled—turn the setting off or add that folder as its own workspace root. Ignore reference: https://cursor.com/docs/reference/ignore-file
Attach the path with @ if you still need one file
In Agent chat, type `@` and the filename or folder to force it into context while you finish ignore/index fixes. Prefer a specific `@` path over hoping search rediscovers a buried file. Broader Agent checklist: https://cursor.com/help/troubleshooting/agent-issues
Which tools are best to fix Cursor Instant Grep empty results?
Agent search (Instant Grep)
Official Instant Grep behavior: local index, regex search, no cloud embeddings for search.
Fast regex search blog
How Cursor’s local Instant Grep index works on large repos.
Ignore files reference
.cursorignore and .gitignore rules that can hide paths from Agent search.
Agent troubleshooting
Broader Agent file-discovery checklist when search still misses paths.
Open: 1 spot per week
One labeled sponsor for this topic each week; this week's spot is open. See open weeks →
All tools for “Fix Cursor Instant Grep empty results” →
Related fixes
- Stop a Cursor agent loopHow to fix a Cursor agent loop (same edit, or work after Stop)Fix →
- Claude Code vs Codex vs Cursor ~$20 plansClaude Code vs Codex vs Cursor $20 plan limits: how to pick without burning the weekFix →
- Scan a vibe-coded app for leaked API keysCheck a vibe-coded app for leaked API keys before you share itFix →
- Add an MCP server to Claude Code, Cursor, or CodexHow to add an MCP server to Claude Code, Cursor, or CodexFix →
See also AI tools launched today on the daily board.
NewAIToolsToday Daily
Top 3 AI launches, one model or news item that matters, and one simple fix. A 5-minute read, every weekday.