First guardrail
After the quickstart. Switch one agent from observe to action mode so the guardrail blocks, check that it worked, and switch back.
Observe mode records policy findings without enforcing them. Hook fail mode and proxy availability still apply. Action mode blocks at the levels in Guardrail. Run observe for about a week on a new agent before you switch.
Before you start
- DefenseClaw is installed and an agent is set up (Quickstart).
- You have read
defenseclaw alertsfor a while and the findings look right.
Steps
-
Check the current mode.
defenseclaw guardrail statusGuardrail status ---------------- * enabled: yes Connector Key State Mode Fail Rule pack Block/alert HILT Scan Judge ----------- ---------- ------- ------- ---- --------- ---------------- ---- ---------- ----- Claude Code claudecode enabled observe open default CRITICAL/MEDIUM+ off regex_only off … -
Switch the agent to action mode. Leave out
--connectorto change the global mode that agents without their own mode follow.defenseclaw guardrail mode action --connector claudecodeOK Claude Code is now in action mode: it blocks findings at or above the block-at severity.The running gateway applies the change on its next reload. No restart is needed.
-
Run a command a default rule blocks.
CMD-RM-RFblocks a recursive force delete of/or a top-level directory such as/etcor/proc. Many models refuse to runrm -rf /procthemselves, so no tool call is made; if that happens, use the harmless test rule in Block a destructive command.
Check it worked
defenseclaw alerts --limit 5 Security Alerts (last 2)
+------------------------------------------------------------------------+
| # | Severity | Time | Action | Target | Details [--show #] |
|---+----------+-------+--------------+-------------+--------------------|
| 1 | CRITICAL | 06:59 | scan-finding | ...eToolUse | decision=blocke... |
…decision=blocked means the agent received a deny.
Undo
defenseclaw guardrail mode observe --connector claudecodeTo drop the agent's own mode and follow the global mode again, run defenseclaw guardrail mode --connector claudecode --clear.
Next
First run: init and quickstart
The two first-run commands. defenseclaw init is the guided wizard and defenseclaw quickstart is the zero-prompt equivalent. Both run the same setup and print the same first-run report.
Upgrade DefenseClaw
Upgrade with one command. The latest release's own installer performs the upgrade, keeps your configuration and data, and rolls back on failure.