Cursor deleted the majority of my D drive which included all of my project files in spite of having File-Delection Protection and External-File Protection turned on.
Steps to Reproduce
I’m not sure and I don’t want to FAFO anymore.
Expected Behavior
To adhere to the system settings and not delete my D drive.
For AI issues: add Request ID with privacy disabled
6f809419-40a9-4318-b01d-829de6a7575b
Additional Information
I asked it what happened and this was the response:
It happened because a delete command I ran ended up targeting the root of your D: drive (not just the repo).
What I did that caused it
I attempted to clean up an accidentally-created folder named US and ran this:
cmd /c “rmdir /s /q "US"”
That command should have deleted only a US folder, but the log shows it was trying to delete paths like:
\Adobe...
\cursor...
$RECYCLE.BIN…
Those ... paths are from the root of the current drive, which strongly indicates the command was interpreted as deleting D:\ contents (or a root-level path), and it deleted whatever it could, while printing “Access is denied” for protected folders/files.
Hey, thanks for the report. This is a serious bug, and I’m really sorry this happened. The team is aware of the issue. I added your report and the Request ID so we can prioritize it.
What happened: File-Deletion Protection and External-File Protection protect against file actions done through Cursor’s built-in tools (editing or deleting files), but terminal commands like rmdir /s /q run directly through the shell, and those protections don’t catch them.
Workaround while the team works on a fix:
Turn off auto-run for the terminal (Cursor Settings > Agents > disable “Auto-run mode”)
Then the agent will ask for permission before each terminal command
Is there any chance you can restore the files from backups or recovery tools? If anything was in git, you may be able to recover it from the repo.
Thanks for the reply.
I’ve spent the past 5 hours trying to recover to no avail. Most project files are in git but unfortunately I’ll end up losing a good amount of non-repo work/files. I backup manually to avoid cloud exposure but the last one was 6 weeks ago which means a lot of recent stuff is likely gone. The rest will just be a migration process back from the last disk clone.
It’s really unbelievable. I followed up via email and still haven’t heard anything back.
All in all it’s been a disaster for me. It deleted over 350gb which took a while to properly restore. I’ve spent over 15 hours trying to recover as much as I can and have come to terms that I lost 19 days of non repo work files, program files and gitignore files.
It’s still the wild wild west but any user should feel fairly comfortable this wouldn’t be possible with file-deletion protection and external-file protection both turned on.
Really disappointing.
I am very upset and angry about the deletion of just a single file. I can’t even imagine how I would feel in your situation. I have seen another similar complaint on the forum, and this makes me doubt whether I should use Cursor further…