Human-in-the-Loop Escalation
Escalation triggers and handoff content: escalation and ambiguity and workflow enforcement and handoff. Calibration and sampling: human review and confidence calibration. This note is the system design.
Mechanisms available
PreToolUsehooks returnallow,deny,askordefer;deferends the turn withstop_reason: "tool_deferred"so the call can be resumed after a human decides. Precedence:deny>defer>ask>allow.- Permission rules (deny, ask, allow) and permission modes (
default,acceptEdits,plan,auto,dontAsk,bypassPermissions) set how much runs without asking. Plan mode produces a plan for approval before edits. PermissionRequesthooks implement custom approval handling;AskUserQuestionasks clarifying questions in Claude Code.maxTurnsand spend caps bound autonomous runs.
Risk-tiered autonomy (design guidance)
| Tier | Example actions | Control |
|---|---|---|
| Read-only | Search, summarise, draft | Run freely; log |
| Reversible writes | Create a draft, open a ticket | Auto-approve with sampling and undo |
| Material actions | Refund, config change, send external email | Human approval, or approve above a threshold |
| Irreversible or high-impact | Delete data, deploy, payments, legal or medical decisions | Mandatory human decision; two-person where required |
The tier follows impact and reversibility, not model confidence alone.
Designing the review step
- Show the evidence: the proposed action, the inputs, sources and why, so reviewers can judge quickly.
- Make approval cheap and rejection informative: capture reasons to improve prompts and evaluations.
- Set service levels: who reviews, within what time, what happens if no one responds (default to safe: do not act).
- Audit trail: who approved what, when, on what information.
- Guard against automation bias: reviewers rubber-stamp when almost everything is correct. Sample auto-approved items, track override and disagreement rates, rotate reviewers, include seeded known-bad cases.
- Feedback loop: reviewer decisions become evaluation cases and tuning data (D1.4).
Exam traps
- Approval for everything, so humans stop reading.
- Approval for nothing on irreversible actions.
- Using confidence alone to decide autonomy.
- No behaviour defined when the reviewer is unavailable.
- No audit trail.
References
- Hooks in the SDK — checked Oct 16, 2026
- Choose a permission mode — checked Oct 16, 2026
- Permissions — checked Oct 16, 2026
Check your understanding
Which hook decision pauses a call for a later human decision?Show answerHide answer
Answer
defer.What should drive the approval tier?Show answerHide answer
Answer
Impact and reversibility of the action.How do you detect rubber-stamping?Show answerHide answer
Answer
Seeded known-bad cases, sampling of approvals, and override or disagreement rates.