This document explains an approach to protecting against AI coding agents (like Claude Code and Opencode) accidentally running destructive rm -rf commands, implemented in nateberkopec/dotfiles.
AI coding agents have the ability to execute shell commands, including potentially destructive ones like rm -rf. This is a known risk that has been discussed in the community (original tweet).
The implementation evolved through two pull requests: