KC 301 · Hard engineering
The layered policy under every block
Part of the Knowledge Course — dllama.tech/knowledge-course
KC 301-07 · Agent Guardrails
There is no single “safety switch.” Guardrails are layers, each doing one job.
When something gets blocked, it’s whichever layer saw it first.
Name the layer → decide: the block is the feature working, or config you should change.
02 / 11
Layer 0
What tools exist at all
KC 301-07 · Agent Guardrails
03 / 11
Layer 1
Interactive “should I?”
KC 301-07 · Agent Guardrails
04 / 11
Layer 2
Unconditional, pattern-matched
KC 301-07 · Agent Guardrails
05 / 11
Layer 3
Contain the blast radius
KC 301-07 · Agent Guardrails
06 / 11
Layer 4
The OS-level line
KC 301-07 · Agent Guardrails
07 / 11
KC 301-07 · Agent Guardrails
| Incident | Layer | Verdict | What to do |
|---|---|---|---|
| mkfs in a log heredoc blocked | Layer 2 | False positive, by design | Workaround: send from file |
| dd/mkfs on raw devices refused | Layer 2 | Feature | Stage commands, you run them |
| Tabelog call waiting forever | Layer 1 | Fatigue signal | Review what needs approval |
| Mizuki NOPASSWD | Layer 4 | Real cost | One key = root, no pause |
08 / 11
KC 301-07 · Agent Guardrails
When the block is correct but noisy — approval prompts you’d always approve. That’s what enabled_toolsets and deny-rule exceptions are for: reduce noise, keep the boundary.
When the block is cheap insurance against a real tail risk — raw-device writes are the canonical example.
Trades a prompt for a single point of failure. Acceptable on disposable boxes (Mizuki), dangerous on a credential vault.
09 / 11
KC 301-07 · Agent Guardrails
Guardrails aren’t rules to fight — they’re a layered policy you tune.
The mkfs false-positive and the Tabelog timeout are Layers 2 and 1 behaving as designed; the only genuinely expensive decision this week was the NOPASSWD.
When something gets blocked, ask which layer saw it — that tells you whether to fix the config or thank the layer and move on.
10 / 11
KC 301-07 · Agent Guardrails
Future Sunday.
11 / 11