Stop deleting my code!

Currently if I ask a model a question about my code, then edit my code, then go back to re-ask the question, it deletes all code that was written since before that response. Is this a “feature”? What purpose could this possibly have? All it does it mess with the user. A prompt window sometimes shows up, asking if you want to delete your code, with the default selection being “Yes! Please delete all of my code that I spent the past 10 minutes writing for no reason! Thank you so much!”. The worst part? If you select: No, don’t revert, it still does it sometimes anyways! It forgets or resets your selection randomly, and for no reason. Can this “feature” please be removed? It serves no purpose beyond messing with programmers. Ask to find bugs → Find bugs → Fix bugs → Ask to find bugs again is a very common pattern, and this basically just screws you over if you try to do that.

I’ve been using cursor for years now and recently brought the pro plan to easily access o3 and gemini pro. It’s a super useful software that has saved me tons of time and effort, but it’s extremely painful to see negative “anti-features” like this added over time, making it harder and harder to justify staying.

1 Like

did you mean this ?
I checked and when I asked again, it didn’t lose any code. Do you have auto-save turned on?

It also happens at times when going back to older conversation - removing manual changes that were applied to files in the meanwhile.

Yes, it is ridiculous that the default option is to delete your code. I selected continue without reverting with don’t ask again. Yet it still reverts my code, likely cause the selection is flipping or something. Also worth mentioning is that it is very easy to double tap enter and accidentally do this. I don’t have autosave, no. But the truth is this never tells you what it reverts, so when you’re in a project with many scripts that are 1000s of lines long, it is very hard if not impossible to know what got changed where and when.

Yes to be clear this is what I meant, it deletes user-written code.

1 Like

There’s a setting for it:
Screenshot 2025-07-15 at 7.31.20 PM
Also set rules.