.cursorrules isn't loaded in agent mode. I tested it, here's what actually works

TL;DR: .cursorrules doesn’t load in agent mode. Use .cursor/rules/*.mdc with alwaysApply: true instead.


.cursorrules isn’t loaded in agent mode. I tested this: 0/9 compliance with .cursorrules, 9/9 with the same rule in .mdc.

I originally set out to test whether longer .cursorrules files degrade compliance. Set up three files (~20, ~90, and ~500 lines) with the same target rule and ran each through cursor agent three times. Zero compliance across the board, all lengths. I rewrote the rule with stricter ONLY/NEVER framing. Still 0.

Then I moved the same rule into .cursor/rules/test.mdc with alwaysApply: true and it worked first try. I ran it 9 more times across all three lengths. 9 out of 9.

So I wasn’t testing file length at all. I was testing whether .cursorrules gets loaded in agent mode. It doesn’t.

I also tested having both files present with contradictory rules. The .mdc rule won every time (6/6), not because it has higher priority, but because .cursorrules just wasn’t in the picture.

alwaysApply matters more than I expected

Two identical .mdc files, one with alwaysApply: true, one with alwaysApply: false. True: 3/3. False: 0/3. The default appears to be false (or at least not treated as true), so if you don’t explicitly set it, the file exists but the agent ignores it.

Conflicting .mdc files

Two .mdc files with opposite rules (single quotes vs double quotes), both with alwaysApply: true. The agent didn’t silently pick one. It stopped and asked which to follow. 3 out of 3 times. I think that’s actually the right behavior.

“Clean up” prompts and comments

This one caught me off guard. I had a file with 17 comments (compliance notes, JIRA refs, structural comments). A normal “refactor to early returns” prompt kept all 17. But “clean up, simplify, remove complexity” wiped every single one. 0/17.

Adding a “preserve all comments” .mdc rule brought it back to 10/17. What survived: SOC2/GDPR compliance notes and JIRA/business logic references. What got dropped: structural comments like // Step 1, // Initialize, general explanations.

Framing tradeoffs

ONLY/NEVER framing gets followed more reliably, but it can break things. I had “ONLY use const for variable declarations” and the task needed a counter. 2 out of 3 runs used const for the counter, which obviously doesn’t work. Softer framing (“prefer const”) let the model use let when it actually needed to.

So ONLY/NEVER for hard rules with zero exceptions, softer framing for anything where the model needs judgment.

New files don’t inherit patterns from existing code

When I edited an existing file that already used a custom error class, Cursor followed the pattern naturally. But when I asked it to create a new file in the same project, it defaulted to generic new Error() even though the custom class was right there. An explicit .mdc rule fixed it, but without one, every new file is a small drift away from your conventions.


All of this was on Cursor CLI 2.4.35 using cursor agent --print. The GUI editor might handle things differently, and this could all change with updates. I wrote up a longer version on Dev.to with more detail if anyone wants it.

Update: After further testing prompted by Colin in the bug report thread, the “.cursorrules is ignored” claim was too strong. Both .cursorrules and .mdc files load in agent mode. When both exist, .mdc takes precedence on any conflicting rules. In our original tests, the workspace had .mdc files present from other experiments, which explains the 0/9 result with .cursorrules.

In a clean project with no .mdc files, .cursorrules works fine. The recommendation to use .mdc is still solid (alwaysApply, glob scoping, and precedence are real advantages), but .cursorrules isn’t silently broken like I originally claimed.

Thanks to Colin for pushing us to re-verify.