SafetyCoding agent
Permission modes
Some commands just run, some ask first, some are never allowed.
What it is
Rules per tool and command pattern: allow (tests, linters), ask (installs, git push, deleting files) and deny (rm -rf /, force-push to main, reading secrets).
When to use it
- Any agent that runs shell commands
When to skip it
- "Yes to everything" mode outside a throwaway sandbox
Why (the trade-off)
Most commands are harmless and a few are catastrophic. Rules let the harmless ones run fast.
Where it sits
Safety layer, between the model's tool call and execution.
What it needs first
- Code tools (read, search, edit, run)it gates tool calls
What can be added to it
- builds on itSecret guardSecret guard needs it: it's a set of deny rules plus redaction
- pairs withCheckpoints and undoundo what slipped through
Effect of adding it
- cost —
- latency ↑
- reliability —
- safety ↑↑
Risks it handles
- A destructive command · full
- Instructions hidden in the repo · partial
- Secrets in the transcript · partial
Learn first (AI Engineering)