Reject changes and it deletes the file

terrible bug where when rejecting changes to a file it deletes the entire file you are rejecting changes on. gonna kms.

3 Likes

same

1 Like

same

Happening to me too submitted report this must be common what is going on. when i click apply changes in the chat ai for the updates it highlights the whole file in red and tries to delete it no matter what i do. also when i press ctrl + z to undo changes it duplicates entire rows of code to double the file and makes it so it’s un manageable immediately

1 Like

Having the same problem and it’s getting really frustrating.

Same problem, file is removed when clicking reject or using hotkeys to reject.

Same but what i did is asked the ai to give me the original code of the file i was talking about cause I gave it as context before and it gave me back the original code of the file. It happened to me twice.

1 Like

I am too facing the same issue. For me, cmd+z on mac on the suggestions deletes the file.

Same here - super annoying.

I deleted an entire folder for me now 6 files i worked for hours idk how to recover.

Same and undo function doesn’t bring back the file.

Is this using composer or chat as well? Any screenshots would also be of great help to look into this!

I opened composer at one point and it deleted 7 files of mine I was like what… I think is due to ai formating maybe my ai rules.

Happens to me as well! Started in the last few days. :unamused:

I just clicked reject and it deleted my entire project in one go.

This is seriously upsetting and I’ll tell people to use other AI methods if this doesn’t get fixed. I am pissed.

Bumping this, this issue needs to be resolved immediately. I’m experiencing frequent, unintended file deletions whenever I undo AI changes, which is extremely frustrating.

This is a critical problem and a potential deal breaker for continuing to use Cursor Pro.

1 Like

Same here, i’ve setup a workflow to prevent your self about it :

  • Setup a branch for each features you are working on
  • Be sure to work in that branch in Cursor
  • Commit each components, or bugfix in this branch
  • Look the git history in case of reject click on cursor
  • If you are not familiar with git check about github desktop

Same here, several times a day, clicking Reject deletes the file to the recycle bin… easy to restore but still annoying.

Same experience here. Using Cursor Chat, I clicked “Apply” for a proposed change. When I saw the diffs in the file, I clicked “Reject”; and the file was deleted. I had to git restore it, but of course all of the intervening changes had been lost.

This was the first time I had tried “Reject”. Not good.

Just so I understand, does clicking “Reject” sometimes delete files that were only modified (and not created) by composer instead of just reverting the changes?