Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When creating a new file using Cursor’s agent and then performing multiple operations, pressing Undo sometimes causes the entire file to be deleted.
For example:
A new file is created.
Several modifications are made through the agent (steps 2, 3, 4, 5).
When I press Undo to revert the changes from step 5, the entire source file disappears and cannot be found.
To clarify, this does not happen when undoing all changes.
The issue occurs when undoing a specific edit or statement within the file.
Even though only a partial undo is performed, the entire file gets deleted instead of reverting just that change.
This issue has occurred several times recently.
Is there any way to prevent this behavior?
Steps to Reproduce
- Open Cursor and start a new project or workspace.
- Use the Agent to create a new source file.
- Make several edits to the file through the Agent (e.g., multiple code changes or additions).
- Place the cursor on a specific statement introduced in the latest edit.
- Press Undo (Ctrl+Z) to revert only that specific change.
- Observe that the entire file is deleted instead of reverting just the last edit.
Operating System
Windows 10/11
Version Information
Version: 2.4.31 (user setup)
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: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
auto
For AI issues: add Request ID with privacy disabled
46191ddd-5755-48e9-b412-eafb8c236261
Does this stop you from using Cursor
No - Cursor works, but with this issue