A shell guardrail for AI coding agents.
Aegis checks every command before it runs. Safe commands pass; risky ones wait for you; catastrophic ones are blocked.
Install Aegis — freenpm i -g @iliasalmerekov/aegisOne unchecked AI command can delete files, reset commits, or drop tables.
Aegis pauses risky commands for approval and blocks catastrophic ones.
A terminal session: the agent runs rm -rf ~/project/src. Aegis stops the command and asks for a decision. Allow is pressed; Aegis saves a snapshot before the command runs. A single command, aegis rollback a4f1c9, restores the deleted folder.
One session, three steps.
Aegis stopped this command.
DB-001 — the table is gone for good.
safe alt: ALTER TABLE users RENAME TO users_retired
Aegis stopped this command.
DB-001 — the table is gone for good.
safe alt: ALTER TABLE users RENAME TO users_retired
The “my AI deleted everything” club is getting crowded.
Seven public posts. Files lost, codebases reset, production databases wiped—all by agents with shell access.


![Post by Simon Willison (@simonw): “Important reminder from Reddit here of the risk you’re taking when you run Claude Code with --dangerously-skip-permissions,” quoting the report: “I found the problem and it’s really bad […] rm -rf tests/ patches/ plan/ ~/ — See that ~/ at the end? That’s your entire home directory.” The attached Reddit post reads: “I was having the Claude CLI clean up my packages in an old repo, and it nuked my whole Mac!”](/incidents/in_7.webp)



