Developers have created an open-source tool called Destructive Command Guard that acts as a kill switch for AI-powered coding agents. The tool sits between an AI agent and your shell, intercepting catastrophic commands—like rm -rf on a source folder or a hard git reset over unsaved work—before they execute.
Unlike simple blocklists, the guard is context-aware: it won't stop you from searching for a dangerous string, only from executing it. It can also inspect scripts to catch hidden destructive commands. Thousands of developers have adopted the tool because vendors typically don't ship such protections by default.
However, the creators emphasize that this is a safety net, not a substitute for proper sandboxing. The guard provides an extra layer of defense as AI coding agents become more autonomous.