.cursorignore blocks all files and directories in the project

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I am doing documentation writing and figure generation (using program scripts) in a project directory at the same time, so I want to ignore the program files used when writing the documentation. Therefore, I wrote a .cursorignore file, which only lists the program subdirectories, but I found that sometimes cursor blocks all files in the directory (as shown in the screenshot, which contains the content of .cursorignore and the actual blocking situation), and this directory did not have this problem before the last time I entered cursor.

Steps to Reproduce

Create .cursorignore, list some directories and files, repeatedly close and re-enter the cursor

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.6.27 (user setup)
Commit: 1.99.3
Date: d750e54bba5cffada6d7b3d18e5688ba5e944ad0
Electron: 2025-09-17T20:21:17.042Z
ElectronBuildId: 34.5.8
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.1
OS: 13.2.152.41-electron.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report.

Could you let me know if this also happens in your other projects or only in this one?

It might be a display bug, some users reported the ignore icon disappearing entirely.

Please try adding any file with the ignore icon to the chat context. If that works, it’s just a visual issue, and we’ll fix it in a future release.

I only started using the .cursorignore feature yesterday, and I haven’t seen this situation in other directories. Even in this directory, sometimes deleting .cursorignore can solve the problem.
But I remember this wasn’t a display issue, because initially I wasn’t paying attention to the icons next to the files (Git had already added a lot of icons, I wasn’t paying much attention to Git). But suddenly I tried to @ a file in the chat dialog and found I couldn’t add it, which is when I started to analyze if it was a .cursorignore issue.
Initially, I thought that even if a file was .cursorignored, it should still be possible to add files manually @'d. But after checking the documentation, I found that it indeed wasn’t possible; .cursorignore is a hard block.
It only became normal after I deleted .cursorignore.
Additionally, I think there might be an issue with how the ignore file parses “.”, because it currently lists all files as excluded. I will report again if I encounter a recurrence.

1 Like

I tested it again, and it seems that there’s a line in the .cursorignore file set to exclude the .claude directory. If I delete this line or the “.” before it, it works normally; otherwise, the entire directory will be excluded.

1 Like

Ah, it looks like the root folder is .claude. That explains why everything started being ignored. I didn’t notice that in the screenshot.

Bug: .cursorignore negation rules stop working after 1.6 update; removing a single negation flips to “ignore everything”

  • Product: Cursor IDE
  • Version(s) affected: 1.6.x (worked in 1.5.x)
  • OS: Linux (reproducible generally)
  • Scope: File tree filtering powered by .cursorignore
  • Severity: High (workspace becomes effectively unfilterable or fully hidden)

Summary

After upgrading to Cursor 1.6.x, .cursorignore files that start with a “match everything” rule and then re-include specific directories using negations stop behaving as in 1.5.x. In 1.6.x:

  • With a leading “ignore everything” rule, negations like !some-root/ and deeper !some-root/sub/... often fail to unignore content (nothing is ignored at all).
  • If you remove one top-level negation (e.g., !some-root/), the behavior flips and the entire workspace becomes ignored.

This indicates a regression in how Cursor 1.6 parses wide-scope patterns (e.g., **) combined with negations and directory ancestry rules.

Expected behavior

  • Patterns should follow standard .gitignore semantics:
    • A broad ignore (e.g., /* or **) hides everything.
    • Negations (e.g., !some-root/) re-include that directory, and further negations re-include its children.
    • All paths are interpreted relative to workspace root; absolute filesystem paths are not used.
  • Behavior should match Cursor 1.5.x and typical .gitignore engines.

Actual behavior in 1.6.x

  • With a broad “ignore everything” rule present, the tree is not filtered at all (as if the ignore file were not applied).
  • Removing a single top-level negation suddenly causes the tree to be fully ignored.
  • The same file works correctly in 1.5.x.

Minimal Reproduction

  1. Create a test workspace with random directories:
mkdir -p /tmp/cursor-ignore-repro/{shared,exports,projects}
mkdir -p /tmp/cursor-ignore-repro/projects/{alpha,beta,gamma}
mkdir -p /tmp/cursor-ignore-repro/projects/alpha/{ops,services}
mkdir -p /tmp/cursor-ignore-repro/projects/beta/{charts,ci/common}
mkdir -p /tmp/cursor-ignore-repro/projects/gamma/main/widgetapp
touch /tmp/cursor-ignore-repro/projects/gamma/main/widgetapp/.env
touch /tmp/cursor-ignore-repro/projects/gamma/main/widgetapp/.env.test
  1. Open /tmp/cursor-ignore-repro as a Cursor workspace.

  2. Create .cursorignore in the workspace root with content:

**

!projects/

# Allow some subtrees
!projects/alpha/
!projects/alpha/ops/
!projects/alpha/ops/**
!projects/alpha/services/
!projects/alpha/services/**

!projects/beta/
!projects/beta/charts/
!projects/beta/charts/**
!projects/beta/ci/
!projects/beta/ci/common/
!projects/beta/ci/common/**

!projects/gamma/
!projects/gamma/main/
!projects/gamma/main/widgetapp/
!projects/gamma/main/widgetapp/**
!projects/gamma/main/widgetapp/.env
!projects/gamma/main/widgetapp/.env.test

###
node_modules/
.git/
  1. Observe the file tree:
  • In 1.5.x: everything outside projects/ is hidden; allowed subtrees under projects/ are visible as specified by ! rules.
  • In 1.6.x: nothing is ignored (all files/dirs are visible). The leading ** does not effectively ignore, and the negations seem to be neutralized.
  1. Now, delete just the line !projects/ from .cursorignore and save.
  • In 1.6.x: the behavior flips, and effectively everything is hidden (or the tree becomes overly aggressive in ignoring).
  • In 1.5.x: expected behavior still holds (top-level directory remains ignored unless re-included, with consistent negation behavior).

Notes

  • The repro uses ** as the “ignore everything” pattern, which worked in 1.5.x. In 1.6.x, it appears either:
    • ** no longer acts as a global ignore baseline, or
    • negations combined with ** are evaluated differently, or
    • directory ancestry re-inclusion rules are not being applied in the same order.
  • Using absolute filesystem paths in .cursorignore is invalid by design for .gitignore semantics; the bug manifests even when only relative patterns are used, as shown above.

no, .claude is just one of the folders of the root folder:

1 Like

Thanks, we’ll check it out.

for me having a line that says “/project/agents“ does this.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.