Agent Referencing Unknown Rule in Cursor v2.4.28

Hello Cursor Support Team,

I’m using Cursor v2.4.28 and have configured custom rules in:

  • .cursor/rules

  • Cursor settings/rules

  • *.MDC files

  • Other referenced guidance files

However, the Agent repeatedly references a specific rule that I cannot locate in any of these locations. I’ve reviewed all known rule files and configured sources, but I’m unable to find where this rule is being defined or loaded from.

Could you please help me understand:

  1. All possible locations/sources where Agent rules may be stored or cached, and

  2. How can I identify or disable this unknown rule?

I’m happy to provide logs, screenshots, or additional details if needed.

Thank you for your help.

Best regards,
Laurence

Some things I would immediately check:

  • Do you know the full text of the rule? (does the agent quote it).
  • Does this happen if you start a new repo with an empty folder?
  • Check to see if you have an AGENTS.md file somewhere (you didn’t mention that in your list).
  • Check to see if there are any remote github rules.

this happens when the agent hallucinates rule names. it remembers rules from its training data or from previous sessions and references them even though they dont exist in your actual .cursor/rules/ directory.

a few things that help:

  1. keep your rule filenames descriptive and short. if you have react-components.mdc, the agent is less likely to invent a different name than if you have rule-001.mdc

  2. check that your .mdc files have proper frontmatter with the description field filled in. the agent uses that to understand what each rule does

  3. if the agent keeps referencing a rule that doesnt exist, you can add a meta-rule in an alwaysApply rule that says only reference rules that exist in .cursor/rules/. do not invent or assume rules that are not present.

not a perfect fix but it reduces the hallucination significantly in my experience.