Critical incident: Cursor agent left repository and deleted local Documents folder

Hey, that’s a fair follow-up question, and the example you gave shows the core issue well. A command chain can look like a harmless xcopy, but still end with rmdir /s /q. Then it only takes one quoting mistake or one path expansion/substitution issue for the deletion to happen somewhere else than intended. The [locale] and (auth) parts in your command are exactly the kind of symbols that cmd.exe and PowerShell handle inconsistently.

We’re aware of this class of issues, and similar reports are already tracked internally, including Windows-specific behavior around quotes and escaping.

In the meantime, the practical steps are the same as in my previous reply, and you should treat them as required on any Windows machine with personal data:

  • Turn off Auto-Run or remove anything that deletes, moves, or “cleans” from the allowlist of commands (rm, rmdir, Remove-Item, git clean, xcopy /y when it’s chained with deletes, etc.). Then the agent will ask for confirmation before running it.
  • For destructive operations or big refactors, run the work in a Cloud Agent, a dev container, or a VM, not on the host machine.
  • Keep your work in Git and also make separate backups of Documents.