Cursor rules globs inconsistencies

Describe the Bug

I’m using custom cursor rules extensively in my projects. In single-folder setups (not using a workspace), the globs patterns work as expected. However, in a multi-folder workspace, I’m unable to target certain files with globs.

For example, I have a rule file at ./.cursors/rules/99-cursor-rules.mdc with globs set to ./.cursor/rules/*.mdc, but Cursor reports that no files match, even though the files are present (including the rule file itself). I’ve also tried alternative glob patterns like **/*.mdc and **/.cursor/rules/*.mdc with the same result—Cursor still doesn’t match any files in the workspace. Other glob patterns in my rules seem to work fine, so this seems specific to certain patterns or to workspaces.

Additionally, multiple globs only work if there is no space after the comma. For instance, **/*.cpp,**/*.h works, but **/*.cpp, **/*.h does not match any files.

Steps to Reproduce

Issue 1: Globs Not Matching in Workspaces

  1. Create a workspace with at least two folders.
  2. Add a Cursor rule at ./.cursor/rules/99-cursor-rules.mdc with globs set to any of the following:
    • ./.cursor/rules/*.mdc
    • **/*.mdc
    • **/.cursor/rules/*.mdc
  3. Observe that Cursor does not match any files, even though matching files exist.

Issue 2: Whitespace After Comma Breaks Multiple Globs

  1. Add a rule with multiple globs separated by a comma and a space, e.g. **/*.cpp, **/*.h.
  2. Notice that these patterns do not match any files. Removing the space after the comma makes it work.

Expected Behavior

  • Glob patterns should work consistently in both single-folder and multi-folder workspaces, including targeting rule files.
  • Multiple globs should not be affected by spaces after commas; both **/*.cpp,**/*.h and **/*.cpp, **/*.h should work identically.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (user setup)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T17:09:01.383Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Does this stop you from using Cursor?

No, Cursor still works, but these issues make some workflows unreliable.

offtopic, hows your experience with c++ in cursor?

BUMP

very annoying

1 Like

Works well! I’m working in an Unreal Engine project with 45k lines atm. and it’s going pretty well. But you need to make sure to refactor and split up code often so the models can work efficiently.

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