Short answer
Check approval in code, at the point where the tool runs, not in the prompt. Pick the few actions that need a person (money, messages to customers, deletes), show the reviewer the exact arguments, and tie the approval to those exact arguments so it is used once. If the arguments change, ask again.
Approval is the right guard for actions you can't take back. It is also easy to get subtly wrong: an approval asked for in the prompt, an approval that can be reused, or an approval for one refund that ends up covering a different one. This guide shows a gate that avoids all three, tested before publishing.
Pick the few actions that need a person
- Money: payments, refunds, credits, plan changes.
- Other people: emails, messages and posts that customers will see.
- Things you can't undo: deletes, and changes to production.
Everything else should go through rules, not people. If reviewers see dozens of requests an hour, they start saying yes without reading. Hard rules for what must never happen (see deny lists), approval for the short list above.
Three ways approvals go wrong
- Asked for in the prompt. "Always ask before refunding" is a request to the model. A confused or tricked model skips it.
- Approved once, used twice. A yes stored as "refunds are approved" lets the next refund through too.
- Approved one thing, ran another. The reviewer saw a $40 refund. Between the approval and the run, the amount became $400.
The fix: approve the exact call, once, in code
Put the check where the tool runs, so nothing reaches the tool without it. Store a fingerprint of the tool and its exact arguments, compare it when the tool runs, and use each approval once:
import hashlib, json, uuid
class NeedsApproval(Exception):
def __init__(self, request_id, tool, arguments):
super().__init__(f"{tool} is waiting for approval ({request_id})")
self.request_id, self.tool, self.arguments = request_id, tool, arguments
RISKY = {"refund_payment", "send_email", "delete_record"}
pending = {} # request_id -> fingerprint of the exact call (use a database in production)
approved = set()
def fingerprint(tool, arguments):
return hashlib.sha256(json.dumps([tool, arguments], sort_keys=True).encode()).hexdigest()
def approve(request_id):
"""Called by the person, from Slack, email or an admin page."""
approved.add(pending[request_id])
def run_tool(tool, arguments, tools):
if tool in RISKY:
fp = fingerprint(tool, arguments)
if fp not in approved:
request_id = str(uuid.uuid4())[:8]
pending[request_id] = fp
raise NeedsApproval(request_id, tool, arguments)
approved.discard(fp) # one approval, one use
return tools[tool](**arguments)In the agent loop, a held call pauses the run and goes to a person:
try:
result = run_tool(call.name, call.arguments, TOOLS)
except NeedsApproval as wait:
notify_reviewer(wait.request_id, wait.tool, wait.arguments) # show the exact arguments
save_run_state(run_id) # resume when approved
return "waiting for approval"We tested this on 5 December 2026. A $40 refund was held, then went through once it was approved. Running the same refund again was held again, because the approval had been used. A refund for the same order with the amount changed to $400 was held too. Only one refund was made.
What your framework already gives you
- OpenAI Agents SDK: a tool can be marked as needing approval. The run pauses with an interruption, and you approve or reject that call before it resumes.
- LangGraph:
interruptpauses the graph until you resume it with the person's answer.
Use them for the pause and resume. Check that the approval is tied to the exact arguments and can't be reused, as above.
What this simple version does not cover
- Waiting. A person may answer in an hour. Save the run's state so it can resume, instead of holding a process open.
- No answer. Decide what happens when nobody answers. The safe default is no.
- Who may approve. Check that the person approving is allowed to, and record who it was.
- Approval isn't permission. An approved call should still pass your spend limits and tool rules.
- What the reviewer sees. Show the real arguments, not the model's summary of them.
Doing it with SteerPlane
SteerPlane holds actions that match a pattern, such as refund_*, and asks your callback before they go through. The callback gets the action and its details, so the reviewer sees what will actually run. Install it with pip install steerplane:
from steerplane import SteerPlane
from steerplane.exceptions import PolicyViolationError
def ask_a_person(action, details):
# details holds the action's arguments; send them to a reviewer and wait for the answer
return reviewer_says_yes(action, details)
sp = SteerPlane(agent_id="support_agent")
try:
with sp.run(max_cost_usd=5, require_approval=["refund_*", "send_*"],
approval_callback=ask_a_person) as run:
run.log_step("read_orders", cost=0.001)
run.log_step("refund_payment", metadata={"order_id": "A2", "amount": 900}, cost=0.0005)
except PolicyViolationError as e:
print("Stopped:", e) # the reviewer said noWe tested this on version 1.2.1 on 5 December 2026: the callback received the order and amount, a $40 refund went through, and a $900 refund that the callback refused ended the run with a policy error. From version 1.2.0, with @guard and the official OpenAI or Anthropic client, tool calls the model asks for are checked the same way before your agent can run them, and the callback gets the arguments.
One thing to know. The callback is a function in your process, so the run waits while it waits. For approvals that take hours, have the callback check an approval you stored earlier, and pause the run as in the code above.
A checklist for approvals
- Only actions with money, other people or no undo need a person.
- The check is in code, where the tool runs.
- Each approval covers one exact call and is used once.
- Changed arguments mean a new approval.
- No answer means no.
- You record who approved what, and when.
Questions people ask
Which agent actions need human approval?
Actions you can't undo or that reach other people: payments and refunds, emails and messages to customers, deletes, and changes to production. Send everything else through rules, not people, or reviewers start approving without reading.
Does the OpenAI Agents SDK support human approval?
Yes. A tool can be marked as needing approval, and the run pauses with an interruption until you approve or reject that call. LangGraph does the same with interrupt and resume.
Can an approved action be changed before it runs?
Only if the approval isn't tied to the call. Store a fingerprint of the tool and its exact arguments, compare it when the tool runs, and use each approval once.