Cursor 2.0: Project rule MDC files with glob patterns not auto-loaded in conversations

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In version 2.0, when configuring glob patterns in Cursor’s project rule MDC files, the matched MDC files are not automatically loaded as always_applied_workspace_rules during conversations. However, they do appear correctly in Cursor Settings. The same configuration method was working in the latest 1.x version released on October 28th.
Is this a bug or intentional behavior?
This feature is quite useful as it allows more flexible rule configuration based on different files/modules.

Steps to Reproduce

  1. Create a project rule MDC file with glob pattern configuration:

    • Create .cursor/rules/demo.mdc with the following content:
      ---
      globs: test/1.py
      alwaysApply: false
      ---
      123132
      
  2. Create another rule file for comparison:

    • Create .cursor/rules/always.mdc with:
      ---
      alwaysApply: true
      ---
      123
      
  3. Open the file that matches the glob pattern:

    • Open test/1.py in Cursor editor
  4. Verify in Cursor Settings:

    • Go to Cursor Settings
    • Confirm that both rule files are visible and configured correctly
  5. Check always_applied_workspace_rules in conversation context:

    • Start a conversation with the AI assistant
    • Check the always_applied_workspace_rules in the context
    • Observe that only always.mdc (with alwaysApply: true) is loaded
    • Confirm that demo.mdc (with globs: test/1.py) is NOT automatically loaded despite the file being open

Expected Behavior

When test/1.py is open, demo.mdc should be automatically loaded into always_applied_workspace_rules because it matches the glob pattern test/1.py.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

版本: 2.0.43
提交: 1.99.3
日期: 8e4da76ad196925accaa169efcae28c45454cce0
Electron: 2025-10-30T18:49:27.589Z
ElectronBuildId: 34.5.8
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.1
OS: 13.2.152.41-electron.0

For AI issues: which model did you use?

Sonnet 4.5 / Composer 1

For AI issues: add Request ID with privacy disabled

7bcf8ea2-22ee-404c-8113-bb9498364c90

Additional Information

This configuration method worked correctly in Cursor 1.x (latest version as of October 28th)
The issue occurs in Cursor 2.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

Hey, thanks for the report. Let me clarify the expected behavior for glob-pattern rules.

Rules with alwaysApply: false and a glob are Auto Attached: they load when matching files are referenced in chat (via @ mention or added to context), not just when the file is opened in the editor.

From your steps, it looks like you opened test/1.py in the editor but might not have referenced it in chat. Please try:

  1. Open test/1.py
  2. Start a chat and @ mention the file or add test/1.py to the context
  3. Check if demo.mdc now appears in always_applied_workspace_rules

This matches how a similar issue was resolved:

1 Like

Thx, I’ve confirmed that indeed, by @-mentioning a file, the corresponding MDC files that match this file via globs will be loaded.

It seems that the difference from version 1.x is that previously, the currently open file would always trigger this loading. Now it requires manual @-mentioning. This is a change. I think this is acceptable, because although the current workflow requires an extra @ operation, you can achieve the same purpose through the @ operation alone without opening the file at all.

However, there might be a derivative issue: If you don’t actively @ a file, but the agent proactively searches project files in the conversation and reads or modifies arbitrary files, will the corresponding MDC files be loaded based on glob matching? It seems like this doesn’t work now, but it did in version 1.x.

Thanks for confirming that @ mention behavior works.

About your follow-up on agent-initiated file search: that’s a good catch about the difference from 1.x. I’ll check with the team whether glob-matching rules should apply when the agent searches/reads files on its own, not only when you explicitly use an @ mention.

Could you share the Request ID from the dialog where the agent searched and read files but the matching glob rules didn’t load? That will help us verify the expected behavior.

1ed86fd3-4a58-46e0-93a7-9c617adecd0c

76758764-9881-491a-8835-53611de5d30c

In these requests, I constructed a minimal verification example that demonstrates that after reading a file, the rules matched with this file through glob patterns are loaded into the conversation. They are attached after the read results in the form of ‘Cursor Rules relevant to this file:’.

Furthermore, if the file is read again, the rules will not be loaded repeatedly.

This seems very reasonable and effective, and there don’t appear to be any issues.

An advanced question is whether these ‘Cursor Rules relevant to this file:’ will be cleaned up after summarization. For large projects and tasks, this is also a fairly critical point. I think perhaps the rules from previous turns of the conversation should be cleaned up to reduce potentially irrelevant context usage. And if a file from before the summarization is read again, perhaps the rule should be attached again. I hope you have considered and correctly implemented the relevant logic.

@deanrie I really think its a bug. Is there any way to have original (cursor 1) behaviour?
It was quite simple and smart to have rules which auto apply based on what files you currently working on. Example, backend rules when u open .php, frontend rules when you open .ts