When I revert changes an agent has made via the undo button, they don’t actually undo the changes the agent made to those files. It’s also strange because I don’t see the normal approve/decline UI for each of the changes the agent has made to the file. Making me think that something related to the state of the file has been broken. This is reproduced in 2.5 and 2.6 and 2.7.
Steps to Reproduce
Ask agent to edit a file (can be big or small), a bigger edit shows the headache it is when reverting because there’s no easy way of cleaning up. But ask it to edit a file, then wait for it to complete, then click the undo btn. It should properly undo the chat message, but not the actual code in the file.
Expected Behavior
The expected behavior should be to revert the code edits to the previous state.
Operating System
Windows 10/11
Version Information
Cursor IDE, Version 2.5.25
For AI issues: which model did you use?
Opus 4.6 Max, but isn’t an AI issue it seems more state related.
For AI issues: add Request ID with privacy disabled
8610ffdd-4760-4fd6-918f-43631bd21df9
Additional Information
I emailed cursor support with video, video’s too long to upload to this apparently. So here’s a onedrive link.
Hey, thanks for the report. This is a known bug with diff rendering. When the agent makes edits and the diff doesn’t show correctly, the Keep and Undo buttons don’t appear, and reverting to a checkpoint breaks. The chat looks reverted, but the files stay modified.
Workaround: make a git commit before big agent sessions. If checkpoint revert doesn’t work, you can always roll back with git checkout -- . or git stash.
@deanrie Is there any timeline for a fix on this. I see reports going back to December at least and there still seems to be no progress despite numerous updates. It’s not so much a case of ‘if checkpoint revert doesn’t work’ - it never works!
I don’t use git so I am having to keep local copies for potential reversions and need to develop in really limited sessions to ensure I have a suitable version history and therefore avoid doing too much in one session.
This is not a cheap application and it seems a shame that it’s taken more than 3 months to give your users back the ability to simply undo their last change without wiping out a session entirely