Cursor sometime like to remove my code comments

Version: 0.45.3
VSCode Version: 1.96.2
Commit: 92081828ae09de344d8673d063f4f5c55c81c9a0
Date: 2025-01-24T20:11:05.745Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.2.0
1 Like

You should be able to add a rule to either your “Rules for AI” or a .cursorrules file to tell it not to edit or remove comments!

In fact, I had already set it. But still sometime not work.
I think this maybe a issue of cursor apply, not ai issue

1 Like

Same here, it’s always removing my comments. And I have “NEVER remove comments” everywhere I can think to put it and it still does.

1 Like

I’ll report this to the team to look into, but just as a warning, if your AI Rules are too long, they may be “ignored” by the LLM, as much like a human, it’s unable to output a response while keeping all of these rules fresh and followed precisely!

1 Like

I definitely learned this early on :smiley: so I’ve kept my rules pretty concise, I get GPT to “give me these rules in as few tokens as possible”. I’ve got them down to about 20 lines. And still, I find cursor does NOT read documentation/comments which would have helped it to avoid tonnes of errors, and the apply model is always deleting my comments. While I tend to review all the diffs it’s still a pain.