Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Summary
Model constantly ignores instructions despite system/global instructions, project instructions, user-rules, memories and in-prompt requests.
Details
I say avoid deprecated code, it still uses deprecated code when writing tests. It frequently falls back to Angular<=v17 style of testing rather than Angular-v20 style of testing as indicated in many places.
I say don’t define unused variables, it still leaves variables in the code.
I say don’t use unused imports and it still imports code that never gets used.
I say check your work after TODO Is complete; it sometimes checks its work.
I phrase this in so many ways it should be obvious by now and yet…
I still see unused code imported, unused variables defined and functions created that serve no purpose and will never get used being defined.
I say don’t cd into the working directory of the project, assume you are already there.
It continues to include cd /path/to/my/project && npm run build despite instructions, rules, memories and sometimes in-prompt requests saying otherwise.
Context
Doesn’t matter if it’s Claude, GPT-4, GPT-5, or any of the others, this issue persists (albeit, Claude is probably the least culpable in this).
Steps to Reproduce
In system/global instructions, I have (in ~/.cursor/rules/globals.mdc with the alwaysApply: true in the header):
- Avoid importing unused code into the namespace. Remove imports if they are not used in the module.
- Avoid trailing spaces anywhere in code.
- Avoid unused imports, variables, functions, classes, interfaces, enums, types, and constants.
- Check your work after completing the TODO list to ensure you've followed instructions.
In user rules, I have:
- Avoid unused imports in all code.
- **Avoid deprecated code at all costs!**
In memories, the model has saved at least these:
- The user prefers the assistant to avoid deprecated code, remove unused imports and unused variables, correct all errors, and aim for 100% passing tests in their codebase.
- In Angular v20 tests, the user prefers using a real Router with provideRouter or RouterModule.forRoat and provideLocationMocks along with RouterTestingHarness instead of mocking the router or using RouterTestingModule.
- The user prefers the assistant to avoid deprecated code, remove unused imports, correct all errors, and aim for 100% passing tests in their codebase.
Observe how the model has saved a memory twice here. I’ve deleted duplicate memories in the past, so we can clearly see it identifying intent here.
Relevant snippets from $project/.cursor/rules/project.mdc:
## Testing
- **Avoid using deprecated code!!!**
- Avoid unused imports!
- Avoid unused variables!
I send it the instruction to:
Can you please build unit tests for this model?
Avoid unused imports.
Avoid deprecated code. We’re using Angular-v20 here.
No need tocdinto the working directory, you’re already there.
Yet …
Still…
Unused imports, variables, class functions sometimes, deprecated code used and when it asks to run a command, I get prompted to approve cd /path/to/my/project && npm run build.
This is a long-running issue of mine; a problem I’ve been dealing with Cursor nearly since the day I picked up the IDE at the top of June.
Expected Behavior
The model should honour my instructions and avoid unused imports, unused variables, cd into working directories when it’s already present (at least do a os.getcwd() internally first, sheesh) and avoid deprecated code.
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.7.28
VSCode Version: 1.99.3
Commit: adb0f9e3e4f184bba7f3fa6dbfd72ad0ebb8cfd0
Date: 2025-10-01T02:45:21.769Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Linux x64 6.6.58
For AI issues: which model did you use?
Auto
GPT-4 (when it was around)
GPT-5 (worst offender)
Claude-4-Sonnet (albeit less common)
MAX mode (albeit less common)
Does this stop you from using Cursor
No - Cursor works, but with this issue