Certain files that are explicitly allowlisted in .cursorindexingignore using ! rules are not being indexed by Cursor, even though they exist on disk and are not ignored by .gitignore or .cursorignore.
This prevents me from using Cursor’s codebase features as expected for these files.
How to Reproduce:
-
Project structure (anonymized):
<project_root>/ .cursorindexingignore .gitignore .cursorignore <project_name>/ package.json .env prisma/ schema.prisma migrations/ 20250314063259_init/ migration.sql _examples/ some.json -
.cursorindexingignore contents:
<project_name>/* !<project_name>/.env !<project_name>/prisma/migrations/20250314063259_init/migration.sql !<project_name>/prisma/schema.prisma !<project_name>/package.json !<project_name>/_examples/* !<project_name>/.cursor/rules/* -
.gitignore and .cursorignore:
- Both files are empty or do not contain any rules that would ignore the above files.
-
Files exist on disk:
- All the allowlisted files (e.g.
.env,package.json,.prisma,.sql,.json) are present and readable.
- All the allowlisted files (e.g.
-
Open the project in Cursor, wait for indexing to complete.
-
Check
embeddable_files.txt:- Only a few files (or none) from the allowlist appear in the index, while most are missing.
Expected Behavior:
All files explicitly allowlisted in .cursorindexingignore (using !) and not ignored by .gitignore or .cursorignore should be indexed and appear in embeddable_files.txt.
Actual Behavior:
Most allowlisted files (e.g. .env, package.json, .prisma, .sql, .json) are not indexed and do not appear in embeddable_files.txt, even after restarting Cursor and double-checking ignore files.
Minimal Repro Example:
- Create a test folder and file:
mkdir -p test-cursor-index echo "hello" > test-cursor-index/should_be_indexed.txt - Add to
.cursorindexingignore:test-cursor-index/* !test-cursor-index/should_be_indexed.txt - Ensure
.gitignoreand.cursorignoredo not ignore this file. - Open project in Cursor, wait for indexing.
- Check
embeddable_files.txt:grep "test-cursor-index/should_be_indexed.txt" "$HOME/Library/Application Support/Cursor/User/workspaceStorage"/*/anysphere.cursor-retrieval/embeddable_files.txt- The file does appear in the index (minimal example works).
- But for real project files (see above), they do not.
Screenshots / Logs:
- Output of debug script showing missing files in
embeddable_files.txt - Directory listing showing files exist on disk
System Info:
- OS: macOS (Sequoia 15.3.2)
- Cursor version: (please specify, e.g. 0.49.6)
Does this block you from using Cursor?
Yes, it prevents me from using Cursor’s codebase features for key project files.
Additional Notes:
- I have double-checked that the files are not ignored by
.gitignoreor.cursorignore. - I have restarted Cursor and reloaded the project multiple times.
- The issue persists for files like
.env,package.json,.prisma,.sql, and.jsonin<project_name>. - The minimal test case works, but real project files are not indexed.
Links:
Thank you for looking into this!