AI assistant ignores .cursorrules file requirements

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The AI assistant in Cursor is not consistently reading or following rules
defined in the .cursorrules file. For example:

  • Rules explicitly state to use Inertia router methods instead of fetch()
  • Assistant violated this rule multiple times despite the rule being clearly
    documented
  • This causes runtime errors (419 CSRF errors) and requires manual fixes

Expected Behavior:

  • Assistant should read .cursorrules at the start of each session/task
  • Assistant should validate its proposed changes against .cursorrules
  • Assistant should refuse to make changes that violate established rules

Actual Behavior:

  • Assistant makes changes without checking .cursorrules
  • Assistant violates explicit rules that are clearly documented
  • Requires user intervention to catch and fix violations

Steps to Reproduce

See above.

Rules created in .cursorrules but ignored, rule was

CRITICAL: Always Use Inertia Router Methods

NEVER use raw fetch() for POST/PUT/DELETE requests. Always use Inertia router methods.

:white_check_mark: CORRECT:

  • router.post(url, data, options) - for POST requests
  • router.put(url, data, options) - for PUT requests
  • router.delete(url, options) - for DELETE requests
  • router.get(url, data, options) - for GET requests
  • router.patch(url, data, options) - for PATCH requests

:cross_mark: INCORRECT:

  • fetch(url, { method: 'POST' }) - will cause 419 CSRF errors
  • axios.post(url, data) - not used in this project
  • Any direct fetch without CSRF token handling

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.50
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.14.0-37-generic

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. What you’re describing is a known issue: AI ignores rules from .cursorrules, especially when chat history grows. Rules are sent only once at the start of the conversation, and with context overflow they drop out of the model’s memory.

For now, try this:

  • Explicitly add the .cursorrules file to the context: type @ and select your .cursorrules
  • Start a new session Ctrl+N - rules will be fully applied again
  • Also try switching to the new system: create a .cursor/rules folder in your project root and split rules into separate .md files (they work more reliably)
  • Shorten chat history when it gets long - context overflow kills rules

I recommend migrating to .cursor/rules - it’s a more stable system.

It was cursor itself wrote the cursorules , I’ll give it a go, thanks.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.