Human review for AI workflows: approve before sensitive actions
Human-in-the-loop review pauses an AI workflow before a risky or hard-to-reverse action so an authorized person can approve or reject the specific action. Merely asking someone to read the final answer does not prevent a tool from causing an external effect. Review must happen before the tool runs, and the reviewer needs enough information to judge what will happen, to which target, and under whose authority.
Human-in-the-loop review pauses an AI workflow before a risky or hard-to-reverse action so an authorized person can approve or reject the specific action. Merely asking someone to read the final answer does not prevent a tool from causing an external effect. Review must happen before the tool runs, and the reviewer needs enough information to judge what will happen, to which target, and under whose authority.
This guide covers product and system design for AI apps and agents that use external tools. It does not prescribe a specific SDK method or legal obligation. The principles synthesize pause-and-approval patterns documented by the OpenAI Agents SDK/API and LangGraph with general safety design. Check the current runtime documentation for implementation details.
Automated checks and human approval serve different roles
Guardrails or automated validation check inputs, tool arguments, results, or final outputs against rules or code. They can verify required fields, whether an account matches the authenticated user, or whether output follows an allowed format. Repeatable, objective conditions suit automation.
Human approval pauses when an authorized reviewer must consider context and consequences. Examples include refunds, cancellations, file edits or deletion, and messages sent outside the application. The model may propose the action, but the tool must not execute before approval. OpenAI documentation distinguishes automatic guardrails from human review before sensitive tool calls; together they determine whether a run continues, pauses, or stops.
Human review is not a universal error detector. Reviewers can judge only what the interface shows; unclear information or time pressure can reduce the quality of decisions. Define the purpose, authority, and review criteria narrowly.
Which actions need approval?
Choose approval based on an action’s effect and scope, not merely its name. Ask whether it affects external systems, can be undone, touches money, permissions, or personal data, and how severe a mistaken action could be. A read-only lookup may be automated, while changing account settings or sending a customer message may need review.
One possible design uses risk tiers: automatically run low-risk reversible actions, apply conditional checks to moderate-risk actions, and require prior approval for high-impact or hard-to-reverse actions. This is an illustrative design, not a universal legal or safety classification. Set thresholds for the application’s permissions and consequences.
What the approval request should show
Show the tool and exact proposed action, target identifier, requested changes, relevant account or project scope, likely effect, and evidence needed to judge it. Do not show only the model’s explanation: include the actual tool arguments and permission information verified by the server. Tool names, arguments, and user-provided text are untrusted display content; escape them safely and hide unrelated sensitive data.
Let the reviewer distinguish approve, reject, request changes where supported, and ask for more information. Rejection must not silently become approval or a hidden failure; cancel the action and provide a safe alternative or human support. Bind approval to a pending action identifier and expiration so an old approval cannot be reused for another action.
Approval lifecycle
The model proposes a tool action.
Policy checks decide that it needs prior approval, so execution pauses before the tool runs.
The application stores the pending item and resumable run state, then shows the reviewer the minimum information needed.
The server authenticates the reviewer, checks their authority for this operation, and verifies the decision refers to this exact pending action.
If approved, the server revalidates the stored action and resumes it. If rejected, it does not execute the tool and communicates the rejection safely.
Record the decision maker, time, target, and actual outcome to the extent needed for audit.
The OpenAI Agents SDK describes returning an approval interruption and resumable state when a tool needs review, then continuing the same run after approval or rejection. A long-running approval can be stored and resumed later. LangGraph also documents pausing a workflow for human input and resuming after a response. Exact state and authorization mechanisms differ by runtime.
Server-side security responsibilities
Never trust an approval boolean returned by a browser on its own. The server must authenticate the reviewer and separately authorize them for the action. Load the pending state and arguments from trusted server storage; do not replace them with new tool arguments or serialized run state supplied by the client. Make the state transition atomic so one approved item cannot execute twice due to concurrency or replay.
While review is pending, account permissions, order status, price, or target data can change. Recheck important conditions immediately before execution; if the action changes, request a fresh approval. Protect stored snapshots from tampering and replay, including their integrity, ownership, retention, and access. If the review system times out or becomes unavailable, fail closed: do not treat that as approval.
Example: cancel an order
Hypothetical flow: A customer requests cancellation. The agent extracts the order identifier and intent. Code checks that the order belongs to the authenticated customer and is still cancellable. Because cancellation changes external state, tool execution pauses. The approval screen shows a partial order identifier, what will be canceled, the consequence, and whether the action can be reversed.
If an authorized operator approves, the server rechecks the stored action, cancels the order, and records the outcome. If the operator rejects or the review expires, the cancellation tool is not called and the customer is told that confirmation is needed. Use an idempotency key or order-state check to avoid duplicate cancellation on retries. This is a design example, not a tested product result.
Review quality and operations
Adding a review button does not automatically make a workflow safe. Check that:
The screen matches the exact tool target and arguments that will execute.
The reviewer is authorized and receives only the necessary permissions.
Approval, rejection, edits, timeout, reviewer unavailability, and duplicate responses are handled.
Pending state is stored securely and important conditions are rechecked before execution.
Rejection or unavailable review prevents execution and gives the user a clear next step.
Reviewers are not overloaded with noisy or repeated requests; analyze review times and mistaken approvals or rejections.
Audit records should show who approved what and what actually happened, without copying unnecessary personal data or full conversation histories into the review interface or logs. Align retention and deletion with the application’s privacy policy and relevant rules.
Summary
Human review pauses a sensitive tool action before execution so an authorized person can assess its concrete effects and approve or reject it. Use guardrails for repeatable checks and approvals for important external effects at the tool boundary. The server must authenticate and authorize the reviewer, protect the pending action’s integrity and freshness, and handle rejection, timeout, and duplicate requests safely.
Sources
[OpenAI API: Guardrails and human review](https://developers.openai.com/api/docs/guides/agents/guardrails-approvals?site_locale=en) — distinction between automatic checks and human approval, pausing before tool execution, resumption, and guardrail boundaries.
[OpenAI Agents SDK: Human-in-the-loop](https://openai.github.io/openai-agents-python/human_in_the_loop/) — approval interruptions, resumption, long-running state, and server responsibilities for trusted state and reviewer authentication and authorization.
[LangGraph: Interrupts](https://docs.langchain.com/oss/python/langgraph/interrupts) — pausing workflow execution for human input and resuming after the response.