Sub topic 9
Human approval for irreversible or high-impact actions
This chapter assumes you know how LLM tool calling works, can read short Python snippets, and understand basic access control. Earlier chapters covered tool scoping and enforcing authorization in code. Approval is the next layer. It covers actions that are allowed in principle but too costly to run without a person looking at them first.
Why approval is a separate control
An allowlist answers "may this agent ever use this tool?" It does not answer "should this particular call run right now?" An agent that may send email can still send the wrong message to the wrong person after reading a poisoned web page. The agent has the permission, so the allowlist passes the call. The damage is hard to undo.
Human approval puts a pause between the model's request and the side effect. It limits excessive autonomy, the third axis of excessive agency, after you have already reduced functionality and permissions.
Deciding what needs approval
Do not ask for approval on everything. People who see a prompt for every call stop reading them and click "yes". Reserve approval for actions that meet one or more of these tests:
- Irreversible: deleting records, sending messages, making payments.
- External: the effect leaves your system, such as email or a public post.
- High-impact: it changes permissions, production configuration, or many records at once.
- Sensitive: it touches data the user did not explicitly mention.
Read-only calls inside the sandbox usually run without a prompt.
Enforcing the gate in code
The gate belongs in the runtime, not in the system prompt. A prompt that says "ask before sending email" is a request to the model. A check in code cannot be talked around.
HIGH_RISK = {"send_email", "delete_record"}
def execute_with_approval(name, args, tools, approve):
if name in HIGH_RISK and not approve(name, args):
return {"status": "denied", "tool": name}
return {"status": "ok", "result": tools[name](**args)}The approve callback receives the tool name and the exact arguments. It could show a dialog, post to a chat channel, or open a ticket. It returns True only when a person agrees. A denied call returns a structured result, so the agent can tell the user what happened instead of failing silently.
What the reviewer must see
An approval is only as good as the information behind it. Follow these rules:
- Show the exact arguments that will run, not a model-written summary. A summary can hide the injected recipient or the wrong record ID.
- Bind the approval to those arguments. If the model changes the call after approval, the approval no longer applies and the runtime must ask again.
- Show the source of the request when you can, for example "triggered after reading
invoice.pdf". - Make rejection as easy as approval, and log both.
Common errors
- Approval fatigue. Too many prompts teach people to approve by reflex. Tighten the high-risk list instead of adding more prompts.
- Approving a summary. The reviewer sees "Send the report to the client" while the real recipient is an attacker's address.
- Gating by tool name only. A
write_filecall to a scratch folder differs from one to a deployment config. Combine approval with argument checks, so low-risk argument values skip the prompt and risky values trigger it. - No timeout. A pending request that waits forever can pile up or be approved long after the context changed. Expire requests and require a fresh call.
- Same person approves everything. For payments or permission changes, consider a second approver who is not the requester.
Exercise
An agent has a send_email tool. The runtime shows the reviewer the model's one-line summary, "Sending the Q3 report to the finance team", and runs the call when the reviewer clicks approve. Name two problems with this design and one fix for each.
Show answer
First, the reviewer sees a model-written summary, not the real arguments, so an injected recipient or attachment can go unnoticed. Fix: show the exact to, subject, and attachment list. Second, the approval is not tied to the arguments, so the model could change them after approval. Fix: bind the approval to the exact arguments and require a new approval if they change.
Exercise
Why is "ask the user for permission before deleting anything" in the system prompt not enough to protect against accidental deletion?
Show answer
The prompt only asks the model to behave a certain way. A prompt injection or a model error can ignore it. A check in the runtime that blocks delete_record until the approval callback returns true is enforced in code and does not depend on the model's behavior.