Protecting Against Autonomous Agent rm -rf Commands
AI coding agents can run shell commands. Sometimes they run rm -rf by mistake. This deletes files forever. While of course I always read and approve all tool calls manually, by hand, and never let my agents work except under direct supervision 100% of the time, sometimes I miss things.
- Hooks catch
rm -rfbefore it runs - Refuse the command with a clear error telling you to use
trash