Cursor wiped ~300GB from my system after a simple cache cleanup request (critical issue)

Hey, sorry about the data loss. What you described (PowerShell + rmdir /s /q with bad quoting, and the path resolving to the drive root) is a known class of bugs on Windows, and we’re tracking it. Similar reports are here:

Root cause: on Windows we don’t have a filesystem sandbox (like seatbelt on macOS or Landlock on Linux). When we generate cmd /c rmdir /s /q "path" from a PowerShell terminal, quotes and \ are interpreted differently by the two shells, and the path can collapse to the drive root. The /q flag suppresses confirmation.

Recovery steps (do this ASAP while it’s still possible):

  • Don’t write anything to the affected drive, it reduces recovery chances
  • On NTFS, tools like Recuva, R-Studio, and PhotoRec often help. Run them from another drive or a USB stick
  • If System Restore or File History or OneDrive was enabled, check those
  • Shadow copies: run vssadmin list shadows in an admin cmd

To reduce the chance of this happening again right now:

  • In Cursor Settings, turn off Auto-run for terminal, or set up Command Allowlist or Denylist. You can add rmdir, rd, Remove-Item, del /s to the denylist
  • Don’t run the agent with access to your user profile or system drives unless you really need to. If possible, keep projects in a separate folder with no sensitive data nearby

If you have the Request ID from that chat (chat context menu > Copy Request ID) or a screenshot or copy of the exact terminal commands, send it here and we’ll add it to the report. When there’s an update on a fix, I’ll reply in the thread.