Negation in cursorignore doesn't work

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

My agent (Grok 4.6) tells me built-in Grep still didn’t working after overriding the .gitignore with a ! line in the .cursorignore file.

Setup:

repo-root/
    other-repo-root-for-context/
# .gitignore file
other-repo-root-for-context
.cursorignore
!other-repo-root-for-context

Agent says “Grep” still doesn’t surface anything in other-repo-root-for-context with this setup.

Steps to Reproduce

See description.

Expected Behavior

Grep searches things un-ignored in .cursorignore.

Operating System

Linux

Version Information

Version: 3.18.9
VS Code Extension API: 1.128.0
Commit: 2ba48ff3f7514cc4643c52ca9f7b3173d9b66130
Date: 2026-08-27T01:42:22.092Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.6
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Linux x64 7.1.8-arch1-3

Does this stop you from using Cursor

No - Cursor works, but with this issue

Note, we tested Grep and Glob.

And having a forward slash after the negative ignore line, and without the foward slash.

Hey, thanks for the report. Your .cursorignore syntax is correct. The issue isn’t with that.

This is a known issue we’re tracking. When the Index Repositories for Instant Grep setting is enabled, it’s on by default, the indexed search path doesn’t currently respect ! negations in .cursorignore, so Grep and Glob can’t see files that were excluded via .gitignore and then re-included via !.

Workaround: open Cursor Settings, search for Index Repositories for Instant Grep, turn it off, then reload the window. After that, Grep should find files in other-repo-root-for-context again.

If you want to keep instant grep enabled, you can add that folder as a separate workspace folder via File > Add Folder to Workspace. That also fixes it.

Let me know if this helps. I’ll reply here once we have an update on the main issue.