5.3 Action Gating and Human Approval
The problem
A finance operations agent prepares vendor payments. It is configured so that payments over $10,000 need a manager’s approval. The approval card reads: “Paying Acme Ltd invoice INV-2207 for $48,200. This matches the PO and was verified against the vendor master. Recommend approve.” The manager approves. The bank details in the actual payment instruction came from an email the agent had read that morning, which asked to “update remittance details.” Nothing on the card showed the account number, that it differed from the vendor master, or where it came from. The manager approved a sentence the model wrote.
This is the most common way human approval fails in agent systems. The human is present, but the evidence in front of them was produced by the actor being checked.
Why it happens
The model’s self-description is not evidence. A model’s explanation of an action is more output from the same model. It can be wrong because the model made a mistake, because injected content steered it, or because it is pursuing a different goal. Research on reasoning models found that the stated reasoning often omits what actually drove the answer: in Anthropic’s 2025 study, models mentioned a hint they had used only 25% (Claude 3.7 Sonnet) and 39% (DeepSeek R1) of the time (Anthropic, 2025). In the Replit incident, the agent told the user a rollback was impossible; a backup existed and the data was recovered (heise, 2025). Nadella’s essay puts the principle directly: “Validation must be independent of the intelligence being validated” (Nadella, 2026).
Approval is a scarce resource. Every prompt to a human costs attention. When most prompts are routine, people approve by habit. Anthropic reported that constant permission requests in its coding agent caused “approval fatigue,” where users stop paying close attention to what they approve, and that sandboxing reduced permission prompts by 84% in internal use (Anthropic, 2025). Over-gating does not make a system safer; it trains reviewers to click.
What gets approved is not always what runs. If approval is recorded as “the agent may now pay Acme,” and the agent constructs the payment after approval, the executed action can differ from the reviewed one. This is a time-of-check to time-of-use gap.
Approval is the right control for the third OWASP root cause, excessive autonomy: high-impact actions taken without independent verification (OWASP, 2025). Anthropic’s agentic misalignment work makes the same recommendation: require human oversight and approval for actions with irreversible consequences (Anthropic, 2025). It only works if the approval is designed well.
Control patterns
1. Tier actions by consequence, decided by the harness
Classify each tool and parameter combination before deployment. The tier is a property of the action, looked up by the harness. The model does not choose its own tier.
| Tier | Criteria | Examples | Gate |
|---|---|---|---|
| 0: Prohibited | Outside the agent’s purpose, or would weaken oversight | Change permissions, edit audit config, touch other tenants, disable monitoring | Not registered. Attempts alert |
| 1: Auto | Read-only, or reversible with no external effect | Search, read a record the user owns, draft (not send) | Policy check and log |
| 2: Confirm | Reversible state change, bounded impact | Create a ticket, update a field with history, send to a known internal recipient | The requesting user confirms the rendered action |
| 3: Approve | Irreversible, external, financial, or broad impact | Payments, deletes, production deploys, external email with attachments | A separate authorized approver, two-person for the highest values |
Reversibility is the main design lever. If you can make an action reversible, you can often move it down a tier. Soft deletes instead of hard deletes, drafts instead of sends, staged deploys behind a flag, payments scheduled with a cancellation window. Each turns a tier 3 action into a tier 2 action with a compensating action.
2. Build the approval request from the action, not from the model
The harness renders the approval card from the structured tool call and from authoritative systems:
- the exact tool, every parameter, and the identity that will execute it;
- a diff against current state (old bank account, new bank account), fetched by the harness;
- the data that will leave the boundary, or a sample and a count;
- provenance flags the harness knows: “this value first appeared in an external email at 09:14”;
- the policy reasons the action was gated.
The model’s explanation can be shown in a separate, labeled area as “agent’s stated reason (unverified),” or omitted. It is never the primary content of the card.
3. Bind the approval to the exact action
Hash a canonical form of the action. Store the hash with the approval. At execution time, recompute the hash of what is about to run and refuse to execute if it differs. Make approvals single-use and short-lived, and require that the approver is not the requester.
4. Dry run and staged execution
For operations with many effects (migrations, bulk updates, infrastructure changes), split plan from apply. The agent produces a plan; a deterministic tool computes the effects (terraform plan, a SQL EXPLAIN plus affected-row count, a mail-merge preview). The human approves the computed plan, and apply executes that plan only. Stage large changes: 1% of records, check, then the rest.
5. Compensating actions and sagas
For a multi-step workflow that cannot be one database transaction, register a compensating action for each step before executing it (cancel the order, refund the charge, restore the snapshot). If a later step fails or a human stops the run, the harness runs the compensations in reverse order. This is the saga pattern from Garcia-Molina and Salem’s 1987 paper (Sagas). Some actions have no compensation (an external email, a wire transfer after settlement). Those stay in tier 3.
6. Design against approval fatigue
- Gate less, gate better. Move safe work into tier 1 by adding sandboxing and reversibility, so tier 3 prompts are rare and meaningful.
- Batch by decision, not by call. One approval for “these 40 refunds, total $3,100, all under policy limit” is easier to review well than 40 prompts. The batch is still bound to its exact contents.
- Measure. Track approval rate, median time to decision, and per-reviewer rates. A reviewer who approves 100% of requests in under three seconds is probably not reviewing.
- Seed known-bad requests. Periodically inject a synthetic action that should be rejected (with the reviewer informed that tests occur) and measure the catch rate.
- Route by expertise and load. Rotate reviewers, cap queue length, and set a conservative default when no reviewer is available: the action waits or is rejected, it does not auto-approve.
Implementation
The harness creates an approval request from the structured action and authoritative state, binds it with a hash, and the executor refuses anything that does not match.
import hashlib
import hmac
import json
import secrets
import time
from dataclasses import dataclass
def action_digest(tool: str, args: dict, actor: str) -> str:
canonical = json.dumps({"tool": tool, "args": args, "actor": actor},
sort_keys=True, separators=(",", ":"), ensure_ascii=True)
return hashlib.sha256(canonical.encode()).hexdigest()
@dataclass
class ApprovalRequest:
request_id: str
digest: str
requester: str
expires_at: float
evidence: dict # rendered by the harness from systems of record
approved_by: str | None = None
used: bool = False
def create_approval(tool: str, args: dict, actor: str, requester: str) -> ApprovalRequest:
current = vendor_master.get(args["vendor_id"]) # authoritative state, not model text
evidence = {
"action": {"tool": tool, "args": args, "executes_as": actor},
"diff": {"bank_account": {"on_file": current.bank_account, "requested": args["bank_account"]}},
"provenance": provenance_index.first_seen(args["bank_account"]),
"policy": "payment_over_10000",
}
req = ApprovalRequest(
request_id=secrets.token_urlsafe(16),
digest=action_digest(tool, args, actor),
requester=requester,
expires_at=time.time() + 15 * 60,
evidence=evidence,
)
approval_store.put(req)
return req
def approve(request_id: str, approver: str) -> None:
req = approval_store.get(request_id)
if req is None or time.time() > req.expires_at:
raise PermissionError("unknown or expired request")
if approver == req.requester or not authz.can_approve(approver, req.evidence["policy"]):
raise PermissionError("approver not eligible")
req.approved_by = approver
approval_store.put(req)
def execute_approved(request_id: str, tool: str, args: dict, actor: str) -> dict:
req = approval_store.get(request_id)
if req is None or req.approved_by is None or req.used or time.time() > req.expires_at:
raise PermissionError("no valid approval")
if not hmac.compare_digest(req.digest, action_digest(tool, args, actor)):
raise PermissionError("action differs from what was approved")
req.used = True
approval_store.put(req) # mark used before executing: single use
return tool_gateway.call(tool, args, actor=actor, idempotency_key=req.request_id)
In production, approval_store.put for the “used” flag should be a compare-and-set so two concurrent executions cannot both pass. The idempotency key (see 5.5) protects against a retry executing the payment twice.
The approver’s view, rendered from evidence:
PAYMENT $48,200.00 to Acme Ltd (vendor V-1182) executes as: svc-ap-agent
Bank account on file: ...4471 REQUESTED: ...9036 <-- CHANGED
First seen external email from acme-billing@acme-payments.co, today 09:14
Policy payment_over_10000; bank detail change (requires callback)
[Reject] [Approve after callback verification]
Agent's stated reason (unverified): collapsed by default
Where it breaks
- Rubber-stamping. No technical control forces attention. Fatigue metrics and seeded tests detect it; they do not prevent it.
- Evidence can be incomplete. The card shows what the harness knows. If provenance tracking misses a source (data paraphrased by the model, for example), the card will not flag it. Prefer comparisons against systems of record, which do not depend on provenance.
- Tiering mistakes. An action classified as reversible may not be in practice (a “soft delete” that triggers a downstream purge job). Verify reversibility by testing the compensation, not by reading the API name.
- Decomposition. An agent blocked on one large action may achieve the same effect through many tier 1 or tier 2 actions (40 small refunds instead of one large one). Pair per-action tiers with session and daily aggregates (5.4).
- Social engineering of the approver. Content the agent produced (a ticket description, a message to the approver) can itself carry persuasion or injected text. Render untrusted fields as data, clearly labeled.
- Compensation is not undo. Refunding a charge does not erase the customer’s experience of being charged; deleting a sent email does not unsend it.
Lab exercise
In Lab 5, Task 5.3 has you classify your agent’s actions by risk and reversibility, require approval for the high-impact ones, and build an approval screen or log entry that shows the reviewer the exact action and data rather than the model’s explanation.
Check your understanding
- Why is “the agent’s reasoning trace” a poor primary input for an approver, even if the model is generally reliable?
- An approval is stored as
{"run_id": ..., "approved": true}. What attack does this permit, and how does action binding stop it? - Give two ways to move a tier 3 action to tier 2.
- A team’s approval rate is 99.6% with a median decision time of 2 seconds. What do you conclude and what do you change?
Answers
- It is output from the actor being checked. It can be mistaken, steered by injected content, or unfaithful to what actually drove the action. The approver needs the actual action, parameters, diff against systems of record, and data provenance, which the harness can produce independently.
- Approve-then-swap: the agent (or an injection) changes the parameters after approval, and execution still sees “approved.” Binding stores a hash of the exact canonical action and refuses execution if the action about to run hashes differently, with single use and expiry.
- Make it reversible (soft delete, scheduled payment with a cancellation window, staged deploy behind a flag) and register a tested compensating action; or narrow the blast radius (a per-action cap, a smaller batch).
- Reviewers are likely approving by habit (approval fatigue). Reduce volume by moving safe actions to auto via sandboxing and reversibility, batch related actions into one bound decision, rotate reviewers, and seed known-bad requests to measure catch rate.
Sources
- Satya Nadella, Models as Insider Risks in the Super Intelligence Era (Oct 10, 2026)
- OWASP Top 10 for LLM Applications 2025: LLM06 Excessive Agency
- Anthropic, Agentic Misalignment: How LLMs could be insider threats (June 2025)
- Anthropic Engineering, Making Claude Code more secure and autonomous with sandboxing (Oct 2025)
- heise online, Vibe coding service Replit deletes production database (July 25, 2025)
- Anthropic, Reasoning models don't always say what they think (Apr 2025)
- Garcia-Molina and Salem, Sagas (SIGMOD 1987)