# 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.

AI and LLM interview question Q366, LLM system design. Advanced, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/design-human-approval-for-risky-agent-actions

## Say it in 30 seconds

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.

## Say it in 2 minutes

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."

- **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.

*Diagram, How a proposed action is sorted: Code sorts each proposed action by risk. Reads and drafts run at once and are logged. Payments above a limit and sends wait for a person, and code compares them with the approved action before they run.*
1. The agent asks to do something through a tool, such as a payment.
2. Code looks the action up in a rule table. Reads and drafts count as low risk.
3. Payments, sends and deletes are high risk, so they wait for a person.
4. Low-risk actions go straight through, and each one is logged.
5. A 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.

*Diagram, What a yes covers: The same request reaches the reviewer two ways. With only a summary, a changed amount runs unnoticed. With the exact action tied to a fingerprint, the same change is refused and goes back to the reviewer.*
1. Version one: the reviewer is shown a summary only.
2. Version two: the reviewer is shown the exact action.
3. The summary still says garage, so the changed amount is paid.
4. The 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.

```python
# 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:

```text
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." Better: A prompt can be talked around. Put the pause and the check in code.
- Trap: "Ask a human about everything, to be safe." Better: Approval fatigue makes people click yes. Keep the gate on the few actions that can hurt.
- Trap: "The model decides when to ask for approval." Better: The 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?

A. Reading the last 90 days of a claim's notes
B. Drafting a reply that a claims handler can edit
C. Paying Riverside Garage £4,800 for claim 31877
D. Adding a note to the claim file

**Answer:** C. Money leaves the company and cannot be pulled back. Reads, drafts and notes are reversible and logged, so they can run at once. The payment waits, and code compares the payee and amount with the approved action before it moves.

**Quick check:** A reviewer approved a payment of £4,800. Before it runs, the amount changes to £48,000. What should happen?

A. Run it, since a person already said yes
B. Run it, then email the reviewer afterwards
C. Refuse it and ask the reviewer again
D. Lower the amount to £4,800 and run it

**Answer:** C. The yes covered the exact action the reviewer saw. A changed amount breaks the fingerprint, so the old yes no longer counts.

## Can you answer these from memory?

**Flash cards**

- **What is human approval for an agent?** A pause in code. A named person must say yes to a risky action before it runs.
- **Which actions need approval?** Anything that moves money, sends to outsiders, deletes, or cannot be undone.
- **What does the reviewer see?** The exact action with its real details, read from the tool call.
- **Why fingerprint the action?** So a change after the yes, like a new amount, is refused and asked again.
- **What if nobody answers?** The request expires and is dropped. It never runs by default.
- **Who may approve?** Someone other than the requester, and every decision is logged.

## Likely follow-up questions

- Q201 What is prompt injection? https://designervenkat.online/interview/ai/what-is-prompt-injection
- Q364 Security architecture for LLM apps? https://designervenkat.online/interview/ai/security-architecture-for-llm-apps
- Q352 Design a work copilot that never leaks data the user can't access. https://designervenkat.online/interview/ai/design-a-work-copilot-that-respects-permissions
- Q172 When and how do you add a human in the loop? https://designervenkat.online/interview/ai/human-in-the-loop-for-ai-agents
- Q200 Build a ticket-triage agent that escalates to humans. https://designervenkat.online/interview/ai/build-a-ticket-triage-agent-that-escalates-to-humans
- Q365 Idempotency, queues and retries? https://designervenkat.online/interview/ai/idempotency-queues-and-retries
