In Agent mode with auto-accept enabled, the chat panel shows a “Changed files” list. Each file has a small “X” button. For newly created files, clicking this button permanently deletes the file with:
No confirmation dialog
No undo option
No Recycle Bin recovery
This is especially dangerous for files created during the current session that haven’t been committed to git yet. A single misclick destroys work that may have been built up over many iterations.
Steps to reproduce:
Enable auto-accept in Agent mode
Have the agent create a new file (not yet in git)
Click the “X” next to that file in the “Changed files” list in the chat panel
File is permanently deleted
Expected behavior:
At minimum: a confirmation dialog (“This will permanently delete this file. Are you sure?”)
Ideally: the action should be undoable (Ctrl+Z), or the file should go to the Recycle Bin
For files not tracked by git, the warning should be more prominent
Workaround found: The file can sometimes be recovered via VS Code’s Local History (Timeline panel), which saved the day in my case. But this is not obvious and users may not know about it.
Thanks for the detailed report. You’re right that the per-file “X” (reject) button on newly created files removes them without a confirmation step. Since the file didn’t exist before the agent created it, rejecting it effectively deletes it. The concern about needing a safety net here is valid, especially during long iterative sessions.
For recovery if this happens again:
Checkpoints — open the chat sidebar and restore to the agent’s last checkpoint. This restores the file state, including newly created files.
Click on the previous chat message and type a new message, which will bring up a dialog box asking if you would like to revert file changes. That should help undo it, too.
Local History / Timeline — as you found, right-click the file in Explorer > Timeline for local snapshots.
Git — committing periodically during long sessions gives you a reliable fallback.
Your suggestion about adding a confirmation dialog or trash-based recovery for destructive review actions is noted. Several other users have raised related concerns, and your feedback from a large team deployment helps with prioritization.
Hours of work gone in an accidental click of a small X button on the review bar above the chat input box. Cmd+Z doesn’t work. Not in Loca History. No checkpoints. Loved Cursor up to this point and now reconsidering.