Files in .gitignore and Default Ignore List not being ignored by Cursor

Describe the Bug

As stated in the title, files that are in .gitignore and Default Ignore List not being ignored by Cursor.

As per the documentation here:

“Cursor will also ignore all files listed in the .gitignore file in your root directory and in the Default Ignore List provided below.”

Files in .gitignore can still be added to context in chat, and have their context read by chat. This is in stark contrast to the behaviour exhibited by files in .cursorignore, which cant be added as context and also cannot be read.

Steps to Reproduce

  • create a new project, check it into git

  • create .gitignore, save

  • create new file to test, add a test string to file, add file to .gitignore, save

  • open chat and add to context, ask about contents of file

  • create files that match patterns in Default File Ignore list (i have tried *.tmp and *.bak)

  • open chat and add to context, ask about contents of file

Expected Behavior

Files that are in .gitignore are ‘greyed out’ (as per normal gitignore behaviour), and have the small ‘ignored’ icon next to them, like a file that is in .cursorignore does.

Files that are in the Default Ignore List also behave like those in .cursorignore.

Files that are in .gitignore cannot be added as context to a chat, and the chat cannot read their contents.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.6 (Universal)
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:16:57.571Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report!

It’s possible what is happening is that, by having the file open as the current focused editor, Cursor is attaching that to the chat, as shown here:

While I believe “ignored” files should not be auto-attatched like this, this would explain how the AI is able to read it.

I will pass this to the team to look into now, but can you try:

  • Open a new chat
  • Ensure no files are attatched to your inital prompt
  • Ask it to read the contents of that file (don’t @ it, just mention it by name to see if Cursor can see/read it on it’s own).