Cursor ignoring .cursorrules

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor is ignoring 100% of the rules in .cursorrules.
Previous posts about this were closed with “use a smaller file”.
So here is my very modest file

- ONLY allowed docstrings are for tools and agents. NOTHING ELSE.
- private members and methods should be prefixed with an underscore.
- AVOID using names such as get, set, run. Give UNIQUE searchable names to everything.
- files and methods may only start with test_ or end with _test if they are pytest.
- Create functions, dont just dump code in the main flow.
- ask before doing things the user did not request for.
- DO NOT create summary documents.
- NEVER create TODO code. Always implement.
- AVOID inline imports. imports go at top of file
- DO NOT create fallbacks or "safety" code. There is a single success scenario. Everything else should error.
- AVOID defensive programming. No getattr ever. We want errors to be seen.

When pointing out it ignored the rules, it fixes itself.

Steps to Reproduce

create .cursorrules as above
use cursor
see it ignore everything:

  • ocstrings on everything
  • wrong naming patterns
  • get, set on everything
  • creates docs.md
  • imports inline
  • creates safety code

Expected Behavior

  • Adherence to .cursorrules.
  • Not closing this ticket until the issue is solved.
  • My money should be refunded after 1M tokens of a .md file I will never read and explicitly did not want has appeared when I came back from my coffee break.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.41 (user setup)
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This is a known issue - agents sometimes ignore .cursorrules, even when the file is small.

To pass this to the engineers with context, I need a couple of details:

  • Request ID from the chat where the rules were ignored: Chat menu (three dots in the top right) > Copy Request ID
  • Which mode this happens in - Ask, or Agent?
  • Which model you’re using - Auto, or a specific one?

Similar threads: Cursorrules getting ignored Agent ignoring rules

Can you share the Request ID when you get a chance? It’ll help the team figure out the pattern.

here, just a random time it happened

request id:
1f223749-174a-42b7-a304-e66aacfa5297

agent mode

sonnet4.5

rule ignored:
only allowed to name things test_ if they are pytest.

It created def test_wandb(): which is not pytest.

and here it fixes itself without me even explaining how

50e265f1-9635-4fe2-8c37-5d85b1ccb4d3

Thanks for coming back with the Request ID.

Unfortunately, Privacy Mode blocks access to the Request ID on our side.

To help with debugging, could you try this:

  • Temporarily turn off Privacy Mode (Cursor Settings > General > Privacy Mode), reproduce the issue, and share the new Request ID so our engineers can see what’s going on.

Let me know if you can temporarily turn off Privacy Mode for debugging.

does this work retroactively or do i have to find new request ids?

eef984b6-72f2-40b2-962d-3dc7b9a03dd2

here it created a TRAINING_FLOW_SUMMARY.md
which was explicitely forbidden in the .cursorrules

i allowed data but i want to unallow it ASAP.
please LMK when you got it

Thanks for the Request ID. Unfortunately, Privacy Mode is still enabled, even though you tried to turn it off. This blocks access to the Request ID for debugging.

Let’s try two options:

Workaround (try this first):

  1. Instead of .cursorrules, create the rules via the UI: Cursor Settings > Rules, Commands > New Cursor Rule. Try the .mdc format with alwaysApply: true in the frontmatter.
  2. Or add the rules as a User Rule (Cursor Settings > Rules). These are global and should always apply.

If you want the team to debug your specific case:

  1. Cursor Settings > General > Privacy Mode. Make sure it’s definitely turned off.
  2. Fully restart Cursor.
  3. Make a new test request in Agent.
  4. Send the new Request ID.

Also, please double check that you have .cursorrules in the project root, not .cursor/.cursorrules/ (a folder).

18c41bab-1ad8-4ea9-92b1-86da81e96602

this time it created docstrings

is this not sharing?

a0c33621-656a-4ec9-b8d8-8d6ccb19b6ec

created docstrings

Thanks for the latest Request ID.

We checked and your rules really are being included in the context, they’re visible in the system prompt. So it’s not a bug with passing the rules through, it’s an issue with how the model follows them.

Sonnet 4.5 tends to over-document and sometimes ignores rules even when they’re in context. That’s behavior specific to that model.

Try this workaround:

  • Switch to Opus 4.5, or another model, and check if the rules are followed there.
  • If Opus works better, that confirms the issue is specific to Sonnet.

The team is aware of this issue.

I get the frustration about generating unwanted content, it really is annoying when you’re paying for tokens you didn’t ask for.

I will only constantly work with opus if i get it for the price of sonnet.
This behavior is NOT specific to sonnet. I have seen it with other models.
This problem has been around for a very long time as is evident by other (now closed) threads along this forum’s history, with verious models, including auto.

I hope it’s clear that I will not work with other models just to debug this specific cursor problem.

When do you expect this to be resolved?

I turned privacy mode back on.

I get the frustration.

Quick clarification: the issue here isn’t that the rules aren’t being passed through. We checked, they are in the context. The problem is how models, especially Sonnet, follow them. This is model behavior, not a bug in how the rules are delivered.

In your rules you wrote:

“ONLY allowed docstrings are for tools and agents”

From the model’s point of view, Cursor is an agent that uses tools. It may interpret that as “docstrings are allowed.” Try rewriting it more clearly, for example:

-  NEVER generate docstrings in code, with zero exceptions
-  NEVER create .md documentation files unless explicitly asked

About an ETA, I unfortunately can’t give a specific timeline. This behavior is on the model side (Anthropic), not a bug in our code. The team is aware of these reports, but I can’t commit to a specific fix.

If it keeps getting in your way, other models (Gemini, GPT) really do behave differently on this.

FYI it happens also with Composer. ignores .cursorrules completely.
I have privacy mode on. will it work retrospectively?

AVOID using names such as get, set, run

this is interesting because some of your rules are actually pretty specific and should work. in my experience the pattern is that rules cursor can “verify” tend to stick better than ones it cant.

like “AVOID names such as get, set, run” is clear enough, cursor can check that. but “Create functions, dont just dump code” is harder because theres no clear pass/fail.

i actually tested this, same prompt with “write clean code” vs “always create error.tsx alongside page.tsx”. the vague rule changed nothing, the specific one worked every time. basically if you couldnt verify it in a code review in 2 seconds, cursor probably wont follow it either. might be worth splitting your rules into hard constraints vs nice to haves.