Project rules ignored

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Rules in .cursor/rules/*.mdc are not being followed. ( Was being followed on previous versions of cursor ) .

Steps to Reproduce

Add a rule inside .cursor/rules/rule-name.mdc

( example my no-venv rule )


alwaysApply: true

{
“name”: “Check for virtual environment before install”,
“description”: “Searches for .venv, venv, or env before running any pip/poetry installs.”,
“triggers”: [
“pip install”,
“pip3 install”,
“poetry install”,
“pipenv install”
],
“run”: {
“shell”: [
“if [ -d .venv ]; then”,
" echo ‘:white_check_mark: Activating .venv’;“,
" source .venv/bin/activate;”,
“elif [ -d venv ]; then”,
" echo ‘:white_check_mark: Activating venv’;“,
" source venv/bin/activate;”,
“elif [ -d env ]; then”,
" echo ‘:white_check_mark: Activating env’;“,
" source env/bin/activate;”,
“else”,
" echo ‘:warning: No virtual environment found (.venv/venv/env).’;“,
" echo ‘:light_bulb: Tip: create one with python3 -m venv .venv’;”,
“fi”
]
}
}

Expected Behavior

Since recent updates started doing pip install -r requirements , common behaviors across multiple models and model providers

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.54 (Universal)
VSCode Version: 1.99.3
Commit: 5c17eb2968a37f66bc6662f48d6356a100b67be0
Date: 2025-10-21T19:07:38.476Z (1 wk ago)
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Sonnet 4.5 ( non thinking ) , grok-code-fast-1 , gpt-5-high , sonnet 3.7

Additional Information

This greatly increases my no of used requests ( team plan )

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Thanks for reporting!

To help investigate, could you please check:

  1. Cursor Settings > Rules - Do you see your no-venv rule listed as active?

  2. Chat context - Does it show as active rule when you hover over chat context?

  3. Request ID - From a chat where the agent ignored your rule:

  • Chat context menu (top right) > Copy Request ID, or
  • CMD/CTRL+Shift+P > Report AI Action

Thanks for your response

  1. Yes

  2. yes

  3. 9b480763-f8a3-4bd0-a394-56712f5a4e00

Thanks for the diagnostic info! Looking at your rule format, the issue might be the complex json.

Try simplifying the rule:

markdown

---
alwaysApply: true
---

Before running pip install and related commands, check if .venv or env directory exists and activate it first. Instead of installing packages globally, warn me if these folders don't exist, as this would create issues with my setup.

Also make sure the other rules are not conflicting with this. You can read more here

Let me know if this helps!

Thanks! I assumed that providing a JSON-structured output would help the models better. I will write in plain words next