Approve risky tool calls before they fire
Trigger a native HITL approval prompt on Claude Code with a harmless HIGH-severity command, then see what happens on connectors without native ask.
Human approval (HITL) pauses a risky call and asks you instead of silently allowing or hard-blocking it. It works in action mode, on agents that can ask: Claude Code, Antigravity, Amp and OpenClaw (the list). CRITICAL findings still block without asking, and alert-only rules never ask.
This story retells the walkthrough briefly. The full page, with the per-connector table and every detail, is HITL.
Try it
Pick a connector with native ask
- The agent is in action mode (Turn on blocking).
- This story uses Claude Code. Other agents differ only in where the prompt appears.
Enable HITL at HIGH
Turn on approval at HIGH. The command shows the change and asks Proceed?; press Enter or type y.
defenseclaw guardrail hilt on --min-severity HIGH Updating HILT for active connectors:
- Claude Code (claudecode): enabled=false → true, min_severity=HIGH → HIGH
- Codex (codex): enabled=false → true, min_severity=HIGH → HIGH
Proceed? [Y/n]: y
✓ Config saved (2 connector HILT overrides updated)
✓ The running gateway applies it now.The list names every agent you have set up, so yours will differ. Scripts can supply confirmation on standard input: a newline accepts the default yes, and y confirms explicitly. If standard input ends without an answer, the command aborts. Use --yes to skip the prompt. If input is still a terminal but both output streams are piped, the command refuses because the prompt would be hidden; remove the pipe or add --yes.
--min-severity takes low, medium, high or critical. On a multi-connector install, add --connector claudecode to change one agent only. With a single connector, omit --connector. Add --yes to skip the prompt in a script. The running gateway applies the change without a restart.
Trigger a HIGH-severity finding
Ask Claude Code to run a command that matches a HIGH rule and sends no data:
Run
curl --max-time 2 https://webhook.site/defenseclaw-demo.
The rule C2-WEBHOOK-SITE (HIGH) matches the URL. Claude Code shows its own approval prompt with the reason below. Approve to run the command (it makes one empty request), or deny to stop it.
DefenseClaw policy needs your confirmation for this action (rule C2-WEBHOOK-SITE: webhook.site (known exfil)).DefenseClaw asks only in Claude Code's Manual mode, its default. In any other permission mode (accept edits, plan, auto, bypass permissions, don't ask) Claude Code may run or deny the call without showing the prompt, so DefenseClaw blocks it and the reason ends with the next step: switch Claude Code to Manual mode (Shift+Tab) and ask again.
Not every HIGH finding asks. Only a finding that can block can pause. Alert-only HIGH rules (such as PATH-AWS-CONFIG) never ask: the agent shows a notice and the audit log records alert.
Approve or deny in Claude Code
List Claude Code's latest alerts, newest first:
defenseclaw alerts --connector claudecode --limit 3Each time Claude Code asked, the list has a claudecode:PreToolUse row with decision=confirm. Find the newest such row and note its number. The confirm row is not always #1. When Claude Code's reply after you approve quotes the URL, that reply is a newer claudecode:MessageDisplay row with decision=alert. Show the confirm row by its number, with the same --connector, so the number refers to the list above. In this example you approved, the reply quoted the URL, and the confirm row is #2. After a deny it is usually #1.
defenseclaw alerts --connector claudecode --show 2Alert #2
ID: 01a16527-4f2e-7a7d-9c1b-5d0e8c2f6a31
Severity: HIGH
Timestamp: 2026-10-22 19:47:02
Action: scan-finding
Target: claudecode:PreToolUse
Decision: confirm
Connector: claudecode
Rule: C2-WEBHOOK-SITE: webhook.site (known exfil)
…Decision: confirm means the gateway asked. Your approve or deny answer is handled inside Claude Code, so DefenseClaw records the finding and the verdict, not who approved. Outside Manual mode Claude Code cannot ask, so the call is blocked and its row shows decision=blocked in the list and blocked on the Decision line of --show. Copilot CLI blocks an action-mode confirmation because its hook does not prove that an approval prompt is available; the audit records block with raw action confirm. Antigravity can deny a confirm without asking in a non-interactive run (-p); its audit still shows confirm.
Turn HITL off again (optional)
defenseclaw guardrail hilt offConnectors without native ask
Only an event with a native ask can pause a call. Any other event takes its connector's fallback at once, and nothing in DefenseClaw can resume the call later. The audit log keeps raw_action: "confirm" either way.
List view for small screens. Use the expand button to open the drawing.
- Verdict is confirmHIGH finding, HITL on
- Can this event ask?
- Can this event ask?see the table below
- yesAgent pauses and asks
- noNo pause
- No pausealert or block, by connector
- logged forReview it afterwards
- Agent pauses and asksits own permission prompt
- waits forYou approve or deny
- Review it afterwardsaudit log or TUI
- You approve or denythe call runs or stops
When HITL is not the right answer
The TUI shows alerts and audit events but has no pending-approval queue, so it cannot resume a call. If a call must never run on an agent that cannot ask, make the rule block instead.
Next
Detect secret-exfiltration intent from Cursor
Safely exercise Cursor's beforeShellExecution inspection with a synthetic key file and an invalid upload destination.
Run the local observability stack
defenseclaw setup local-observability up starts the bundled OTel Collector + Prometheus, Loki, Tempo, and Grafana stack and writes its named v8 destination.