Cursor agent rmdir hit a drive root after a quoting bug
Staff say Auto-review should have stopped the recursive delete and asked first. Until a fix, set Run Mode to Ask Every Time.
A single Windows report says a Cursor IDE agent using Grok 4.7 ran rmdir /s /q against the root of D:\ after nested quotes failed from PowerShell into cmd /c. On Oct 13 at 9:47 AM ET, Cursor staff member deanrie said the analysis "sounds right," that Auto-review "should have stopped a recursive command like that and asked first," that it "should not have gone through without confirmation," and that this "was not caused by your settings." He passed the details to the team.
Why it matters#
Recursive deletes at a drive root can destroy projects that are not yet on a remote. This is one staff-acknowledged report, not a fleet-wide outage, but the safety miss is the story.
How to use it#
Until staff post a fix:
- In Cursor Settings > Agents > Run Mode, choose Ask Every Time so every terminal command waits for your click (deanrie's advice).
- Prefer Remove-Item or delete tools scoped to one folder. Avoid
cmd /cwrappers with nested quotes around destructive paths. - Keep important work pushed to a git remote.
If you already lost files on a volume:
- Stop all writes to that drive.
- Run recovery from another drive (Microsoft
winfror PhotoRec), and save recovered files elsewhere. - If the volume is an SSD with TRIM, recovery odds are lower.
- Re-clone anything that was on a remote.
Before any delete, show me the exact full path, confirm it is not a drive root, and wait for my approval. Prefer a scoped Remove-Item. Do not wrap rmdir in cmd /c with nested quotes.
We did not reproduce this. Destructive drive-root deletes are not safe to re-run. Lukas_Korsakas documented agent mode on Cursor 3.17.8 (Windows), model Grok 4.7, with required_permissions: ["all"], after two scoped Remove-Item calls failed because the shell cwd was inside the folder.
Good to know#
- Status: Open. Staff acknowledged and passed it to the team. No fix date.
- Confidence: Staff confirmed the failure mode and Auto-review expectation. The wipe itself is a single user report.
- Product: Cursor IDE agent terminal on Windows, not Grok Bot desktop.
- Mitigation now: Ask Every Time run mode.
What to watch#
Whether Auto-review gains a hard stop for recursive deletes at drive roots, and whether any follow-up reports appear on other shells or models.
