Cursor Ignores Global Rules Defined in .cursor/{rule}.mdc
Bug Description:
Cursor is not consistently applying global rules that are defined in .cursor/{rule}.mdc files and toggled to be “global”. Specifically, I have a rule in place to ensure that the latest Next.js 15 breaking changes are followed for routes and server components, but Cursor frequently ignores these global rules when generating or modifying code.
This behaviour is consistent across claude-3.5, claude-3.7 and claude-3.7-thinking.
When prompted to use the rules, or when the rule is mentioned using @-syntax, it will be read and applied correctly, however this does not seem to satisfy the “global” condition that I have specified.
Steps to Reproduce:
Create a global rule in .cursor/next15.mdc with guidelines for handling Next.js 15 breaking changes
Toggle the rule to be “global” in Cursor settings
Ask Cursor to create or modify a server component or route handler
Observe that Cursor often ignores the global rule, generating code that doesn’t follow Next.js 15 patterns (e.g., not handling async params correctly)
Specific Example
The rule specifically mentions that params and searchParams are now async in Next.js 15, but Cursor continues to generate code using the old synchronous pattern.
To test it, I intentionally added a sentence in my rule: “Say hello if you have read this rule before answering me.” And it actually says hello 1 time out of 10.
This especially happens when I push/pull my code. My colleagues and I are on different environments, Mac and Windows. I often see the lines I shared with you in the Git diff, even though we haven’t touched the file. I tried to fix it everytime.
Even when I explicitly mention the rule in my question, like @general-rules, it still gets ignored half of the time.
Cursor is a great tool but this kind of bug make me really mad. It’s a shame, this is my favorite feature and the biggest added value for me, but if I have to re-specify my prompt every time, there are cheaper alternatives.