Hey, thanks for the detailed report. I’m really sorry this happened. Losing data is always painful.
Your analysis sounds right: when the command was passed from PowerShell into cmd /c, the nested quotes \" were not preserved as escapes, so rmdir /s /q ran on the root of D:\ instead of the target folder. You were using Auto-review, and it should have stopped a recursive command like that and asked first. It should not have gone through without confirmation, and this was not caused by your settings. I’ve passed the details to the team.
Right now, the most important thing is recovery:
- Stop all writes to
D:right away. Don’t install, save, or copy anything there, since new writes can overwrite deleted data. - Run a recovery tool from
C:, and save the recovered files to another drive: Microsoft Windows File Recoverywinfror PhotoRec. - If
D:is an SSD with TRIM, the chances of recovery are lower. - Anything that was pushed to a git remote can be cloned again.
For now, until this is fixed, I’d suggest switching run mode to Ask Every Time in Cursor Settings > Agents > Run Mode. Then every terminal command will wait for your click before it runs.
I’ll post here if there’s an update.