Rule: Comment Code does not work

I have instructed the agent to “Comment Code” before deleting, even including in multiple areas, and it doesn’t seem to take this approach.

It seems like the agent would be much safer if we could simply turn on “SAFE MODE” where it comments code and backs files up before make changes.

  • Cursor integrated checkpoints you can restore if it really goes wrong.
  • Commenting code is not easy to do for AI as it has to figure out what is active code and what commented out (its all text for AI) eventually the commented code will lead to errors when applying changes and to hallucinations in other files as it still exist.
  • On other side i believe its common pratices to use git commits regularly to not lose changes. Definitely something to look into. This would also make it easier to restore code and AI wouldnt be confused with commented out code.
1 Like

That is helpful, thank you. I haven’t tried checkpoints yet.

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