LOCAL RUST KERNEL · ZERO CLOUD API KEYS
Stop Cursor Agent From Deleting Your Repo
UI delete toggles do not stop raw shell deletion, Windows rmdir /s /q wipes, or silent cleanup loops. Gate every command before execution and log every change to BLAKE3.
Why Default Mitigations Fail
- Cursor UI file-delete protection only filters dedicated file-tool calls and cannot inspect compound terminal scripts.
- Windows shells expose del /s /q and rmdir /s /q syntax that POSIX-only shell blocklists ignore completely.
- Without an append-only local ledger, a runaway auto-run turn can overwrite uncommitted git state cleanly before the developer notices.
How Vestige Solves It Locally
- Vestige checks terminal commands across POSIX, PowerShell, and cmd.exe dialects including git reset --hard, git clean -fdx, rmdir /s /q, del /s /q, and Remove-Item -Recurse.
- Chesterton Fence guards protect bug-fix commits so Cursor must inspect prior decisions via causal_walk before editing load-bearing files.
- Every hook verdict and git commit writes a tamper-evident BLAKE3 record into Strata on your own disk.
One-Command Setup Across Claude Code, Cursor, Windsurf, Codex, and Antigravity
npx @vestige/init
MCP config or verification reference:
{"mcpServers":{"vestige":{"command":"npx","args":["-y","vestige-mcp-server"]}}}
Step-by-Step Hardening Checklist
- Run Vestige auto-installer for Cursor: Run npx @vestige/init to write ~/.cursor/mcp.json and wire vestige-hook into Cursor beforeShellExecution and file-edit checks.
- Add Windows and POSIX destructive rules cleanly: Confirm vestige-hook is executable on PATH using where vestige-hook on Windows or which vestige-hook on macOS and Linux.
- Audit every blocked shell call locally: Inspect local gate receipts with precedent so zero destructive terminal wipe slips past auto-run mode.
Documented Production Incidents & References
Frequently Asked Questions
Why did Cursor Agent delete files even with delete-file protection turned on?
Editor delete toggles usually govern high-level file tools rather than arbitrary commands invoked inside terminal tools like rm, git clean -fdx, or Windows rmdir /s /q. Pre-execution shell hooks close that gap.
Does Vestige protect Windows Cursor setups against rmdir /s /q and Remove-Item?
Yes. Vestige evaluates POSIX, cmd.exe, and PowerShell syntax uniformly and blocks recursive wipes outside safe temp paths before execution.
How does Vestige help audit what Cursor changed after a bad turn?
Strata appends hash-chained receipts for hook verdicts, rule saves, and commits locally so every action leaves a verifiable audit trail.