Undo delete the file completely

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In the most recent version, pressing undo anywhere just deletes the file completely!

Steps to Reproduce

have the agent modify a file and instead of keep press undo and the file will be completely gone!

Operating System

Linux

Version Information

Version: 2.4.31
VSCode Version: 1.105.1
Commit: 3578107fdf149b00059ddad37048220e41681000
Date: 2026-02-08T07:42:24.999Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Linux x64 6.18.8-200.fc43.x86_64

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

Hey, this is a known issue. Undo on files that the agent created or modified can delete the whole file instead of rolling back the changes. The bug is logged, and the team is aware.

The same issue is discussed here: Undo suggestion deletes entire file after accepting a created file + one small suggestion

For now, it’s best not to use Ctrl+Z or Undo All on files the agent just created. If you need to revert changes, use Restore Checkpoint from the agent message menu in chat.

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