Why you'd want it
CC Safety Net installs as a pre-execution hook in coding CLIs including Claude Code, Codex, Cursor, Gemini CLI, OpenCode and Copilot CLI, and parses what each command does, so wrapping it in bash -c or python -c or reordering flags does not hide it. It blocks commands such as git reset --hard, git push --force and rm -rf on dangerous targets, and access to SSH keys, .env files, ~/.aws and coding CLI credentials. Presets are tuned in a local GUI, official rulebooks add blocks for Terraform, AWS, gcloud and Azure, and committing .cc-safety-net/ shares the policy through git.
Best for
- Stopping agent force pushes and hard resets
- Keeping agents away from .env files and SSH keys
- Teams running several coding CLIs
Use it when
You let a coding agent run shell commands and want a check that refuses destructive git and file operations before they execute.
Skip it if
You need containment: the README says it is not a sandbox and does not contain processes, set filesystem permissions or watch network egress. It is maintained mostly by one developer and needs Node.js 18 or higher.
Editor's note
The README says a broken config file never blocks anything, so a typo fails open rather than stopping the agent.