Design Human Approval for Risky Agent Actions
How to build a pause in code that lets a named person approve risky AI agent actions, with the right checks, logs and timeouts, for your AI interview.
In short
A risky agent action, such as a payment or a sent email, should pause in code until a named person approves the exact action. Code sorts actions by risk, and the yes is tied to that exact action, so a change after the yes is refused.
13 min readAdvancedCommon · estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
When an AI agent wants to do something risky, like pay a claim or email a customer, I don't let the model decide alone. Code sorts every action by risk. Reads and drafts run at once and get logged. Payments above a set limit and all sends wait for a named person, who sees the exact amount and payee. Code compares the approved action with what was signed off, so a changed amount is refused. The pause is written in code.
An agent that can only talk is a small risk. An agent that can pay, send or delete is a real one. So I start by sorting actions. Reading a claim file and drafting a reply run at once, and every step is logged. Paying a repair garage above the set limit, emailing a customer or deleting a record waits, because money and messages are hard to take back.
The pause lives in code. A hidden line in an email can talk a model around its rules. It cannot skip a check that code runs. The agent saves its state, shows the reviewer the exact payee, amount and claim number, and waits. The yes is tied to a fingerprint of that action, a 64-character code made from its text. If the amount changes to forty-eight thousand pounds, the old yes no longer counts and the reviewer must look again.
The reviewer is never the agent's own requester, and every decision goes into a log with the time and the screen the reviewer saw. If nobody answers within a set time, the request expires and is dropped. It never runs by default.
Last, I keep the gate small. Too many prompts teach people to click yes, and that is the real failure. So only the few actions that can really hurt get a stop, and I sample past approvals to check that reviewers are reading them.
What is human approval for agent actions, in plain words?
An AI agent does more than talk. It calls tools: it can send an email, move money, change a record or delete a file. Human approval means that before a risky tool call runs, a named person checks it and says yes or no.
Think of a large company cheque, which often needs a second signature. The second person checks the amount before signing. An agent needs the same second look, at the exact thing that is about to happen.
Take a claims agent at a mid-size motor insurer. It reads claim forms, drafts replies and proposes payouts. Reading is harmless. A payment of £4,800 to a repair garage is risky, because money leaves the company and is hard to get back. The request it proposes reads "Pay Riverside Garage £4,800 for claim 31877."
Key words
- Tool call
- The model asks your code to run an action, such as a payment. Your code runs it.
- Irreversible action
- Something you cannot fully undo, like a payment that has cleared or an email already sent.
- Approval gate
- A pause in code where the action waits for a yes from a named person.
- Exact action
- The real details: payee, amount, claim number, as the tool call holds them.
Which actions need a person, and which don't?
Sort actions by what they can do to people and money. Keep the rule in a table in code, so you can test it, show it to an auditor and change it without retraining the model.
- Low risk
Reads and drafts
Look up a claim, or draft a reply a handler can edit. Runs at once and is logged.
- Small money
Inside a set limit
Payments to an approved garage under £250, by a made-up limit. Runs, is logged and is reviewed each morning.
- High risk
Pays, sends or deletes
Any payment above the limit, any email to a customer, any delete. Waits for a person.
How a proposed action is sorted
Agent proposes an action
e.g. pay a repair garage
Classify the risk
a rule table kept in code
Runs now
reads, drafts, small payments; logged
Waits for a person
approve, edit or reject
Action runs
code matches the approved action
- 1The agent asks to do something through a tool, such as a payment.
- 2Code looks the action up in a rule table. Reads and drafts count as low risk.
- 3Payments, sends and deletes are high risk, so they wait for a person.
- 4Low-risk actions go straight through, and each one is logged.
- 5A reviewer says yes, and code compares the action with that yes before it runs.
OWASP's 2026 entry on excessive agency draws the same line. Low-consequence or easily reversible actions may run automatically, while an irreversible action, such as an external payout, goes to a human first.
Tip
Don't let the model decide which actions need approval. A model can be tricked, forget, or miss a risk it can't see. Code decides from a rule table.
What must the approval screen show?
A reviewer can only approve what they can see. Show the exact action with its real details, read from the tool call. OWASP's 2026 guidance on prompt injection puts it plainly:
“Require explicit human confirmation before any privileged, irreversible, or externally visible action, surfacing the exact rendered action rather than a summary to the reviewer.”
OWASP, LLM01:2026 Prompt Injection
- 1
Show the real action
Payee, amount, claim number and the account it goes to, read from the tool call itself.
- 2
Show why, with the evidence
The line of the claim form or the photo the agent used, so the reviewer can check the reason.
- 3
Show what happens next
What runs on yes, whether it can be undone, and when the request expires. Say 24 hours, a made-up rule.
- 4
Tie the yes to the exact action
Store a fingerprint of the action when the agent proposes it: a hash of its text, a 64-character code. Before the run, compare the action the reviewer approved with that fingerprint. If the amount or payee changes, the yes no longer counts.
- 5
Keep the reviewer separate
The agent's requester cannot approve it, and every decision is logged with the reviewer's name and time.
What a yes covers
Proposes a £4,800 payment
the reviewer approves it
Summary only
Summary: pay garage
the amount is left out
Exact action shown
Full action on screen
payee, amount and claim number
Paid 48,000 instead
the changed amount runs
Changed action refused
reviewer must look again
- 1Version one: the reviewer is shown a summary only.
- 2Version two: the reviewer is shown the exact action.
- 3The summary still says garage, so the changed amount is paid.
- 4The yes is tied to the exact action, so the changed amount is refused.
Why not ask a yes or no for everything? Because too many prompts teach people to click yes. OWASP's 2026 prompt-injection page warns that "approval fatigue degrades reviewer judgment at volume."
How does the agent pause and resume safely?
The pause has to survive. A reviewer may answer an hour later or the next morning, and the server may restart in between. So the agent's state is saved to durable storage before it waits. LangGraph, a framework for building agents, has a built-in pause called an interrupt that works this way. When it pauses, LangGraph saves the agent's state to storage and waits, with no time limit, until someone resumes it.
Two rules from the same docs are easy to miss. First, work done before a pause must be safe to repeat: "Because interrupts work by re-running the nodes they were called from, side effects called before interrupt should (ideally) be idempotent." A node is one step of the agent's workflow. Idempotent means running it twice gives the same result as once. Second, after a long wait, read the world again. LangGraph's examples are price, inventory and policy. For a payment, re-read the claim, the payee and the limit before the money moves, because they may have changed.
Here is the idea in plain Python. No real model is used. A made-up claims agent proposes a payment, and the code keeps the queue, refuses a self-approval, and refuses a changed amount.
# A made-up claims agent's approval queue. The model only proposes; this code decides.
import hashlib
import json
PENDING = {}
def fingerprint(action):
# Hash the exact action, so a changed amount or payee breaks an old yes.
text = json.dumps(action, sort_keys=True)
return hashlib.sha256(text.encode()).hexdigest()
def propose(ticket, action):
PENDING[ticket] = {"action": action, "hash": fingerprint(action)}
return "WAITING " + ticket + ": pay " + str(action["amount"]) + " GBP to " + action["payee"]
def approve(ticket, reviewer, shown):
item = PENDING[ticket]
if reviewer == item["action"]["requested_by"]:
return "REFUSED: the requester cannot approve their own action"
if fingerprint(shown) != item["hash"]:
return "REFUSED: the action changed after it was shown"
return "RUN " + ticket + ": approved by " + reviewer
claim = {"payee": "Riverside Garage", "amount": 4800, "claim": "31877", "requested_by": "agent-7"}
print(propose("T1", claim))
print(approve("T1", "agent-7", claim))
print(approve("T1", "dana.s", dict(claim, amount=48000)))
print(approve("T1", "dana.s", claim))Output
WAITING T1: pay 4800 GBP to Riverside Garage REFUSED: the requester cannot approve their own action REFUSED: the action changed after it was shown RUN T1: approved by dana.s
The Model Context Protocol, which connects AI apps to tools, recommends the same thing in its spec. The quote below is from its tools section.
“For trust & safety and security, there SHOULD always be a human in the loop with the ability to deny tool invocations.”
Model Context Protocol, tools
Who decides, and what if nobody answers?
Decide three things before you build. Who may approve each kind of action. How long a request may wait. What happens when nobody answers. A request that expires is dropped, not run. If a payment is urgent, escalate to a second person after a set time, such as four hours, a made-up limit. The agent never approves on its own.
Anthropic's post on building effective agents, from December 2024, describes the same pattern: agents "can then pause for human feedback at checkpoints or when encountering blockers." Use checkpoints where a mistake would cost money, a customer or a legal position. Some of that post's tooling advice is now out of date, but this pattern still holds.
In regulated areas the rule can be law. The EU AI Act says high-risk AI systems must be built so that they can be "effectively overseen by natural persons during the period in which they are in use." Plan for that from the start, not as a patch after an incident.
Log who approved, what they saw, the fingerprint, and the time. After an incident, that log answers who approved what, and it shows whether reviewers are reading or clicking.
How would you add approval to a coding agent that can deploy?
Reading code, running tests and opening pull requests run without a stop. A deploy to production or a database migration waits for a second engineer. The approval shows the exact commit and the migration SQL, and the deploy job refuses if the commit changed after the yes.
Tip
Asked how you'd stop people rubber-stamping? Keep the gate on few actions, show the exact thing, and sample past approvals to check that reviewers read them.
What does the interviewer want to hear?
A strong answer covers
- A plain definition: a pause in code until a named person says yes.
- Sorting actions by risk, with reads and drafts running at once.
- The reviewer sees the exact action, with its real details.
- The yes is tied to that action, so a change is refused.
- Expiry, escalation and no self-approval, all logged.
- Too many approvals cause fatigue, so the gate stays small.
Common traps
Trap"Add a human check to the prompt."
BetterA prompt can be talked around. Put the pause and the check in code.
Trap"Ask a human about everything, to be safe."
BetterApproval fatigue makes people click yes. Keep the gate on the few actions that can hurt.
Trap"The model decides when to ask for approval."
BetterThe model can miss a risk. Code decides from a rule table.
Can you spot the risky step?
Spot the risky step
Which agent action should wait for a person before it runs?
Quick check
A reviewer approved a payment of £4,800. Before it runs, the amount changes to £48,000. What should happen?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
- Q201What is prompt injection?12 min
- Q364Security architecture for LLM apps?13 min
- Q352Design a work copilot that never leaks data the user can't access.12 min
- Q172When and how do you add a human in the loop?12 min
- Q200Build a ticket-triage agent that escalates to humans.13 min
- Q365Idempotency, queues and retries?12 min
Last updated on 27 November 2026
Building an agent that can change things in the real world?
I design and build AI agents, including the approval steps, permissions and logs around them. Book a short call and tell me which actions need a person to check them.