GENERATIVE AI
Human-in-the-loop Approval Gates for Agent Workflows
A durable approval architecture for agent workflows that take consequential actions, with explicit reviewer context, pause-and-resume state, routing and a defensible audit trail.
The problem
An agent workflow that only reads is a low-stakes proposition.
One that writes — sends an email, issues a refund, updates a customer record, files a document, approves a payment — is not.
The question that stops these systems reaching production is rarely whether the model is capable.
It is what happens the first time it is confidently wrong about something irreversible.
The common response is to wrap the whole workflow in an approval: a person reviews the final output and clicks yes.
This is better than nothing and worse than it appears.
The reviewer is presented with a completed result and no visibility into the eleven steps that produced it.
Approving means accepting the whole chain on trust, and rejecting means discarding all of it, including the ten steps that were correct.
Reviewers in this position approve, because the alternative is to redo the work themselves, and the gate becomes ceremonial within weeks.
The second problem is what the approval is worth afterwards.
When someone asks who authorised a particular action, on what information, at what time, the answer needs to be a record rather than a reconstruction.
An approval that exists only as a UI event in an application log is not evidence that will satisfy an auditor.
When to use this
- The workflow can take actions that are expensive, irreversible or externally visible.
- Regulation, contract or internal policy requires a named person to authorise specific decisions.
- The error rate is acceptable overall but individual errors are costly.
- Confidence varies meaningfully across cases, so most can proceed automatically and a minority genuinely need judgment.
- An audit trail of authorisation is required.
When not to use this
Everything is reversible and cheap to redo
Let it run and fix errors after the fact.
An approval gate on a low-stakes workflow is pure latency, and it trains reviewers to click through without reading.
That behaviour degrades the gate for the cases that genuinely matter.
Every case needs review
Then this is not an approval gate.
It is a queue with an expensive drafting step in front of it.
That may still be worthwhile, but design and justify it as a drafting tool rather than as automation with oversight.
No tolerable error rate exists at all
Where being wrong once is unacceptable, an approval gate on a probabilistic system is the wrong architecture.
A person reviewing model output has a known and non-trivial rate of missing plausible errors, and the gate can provide less protection than the design implies.
Nobody is accountable for the approvals
A gate routed to a shared inbox with no owner and no response target becomes a place where workflows go to stall.
The pressure to remove it will be immediate and will eventually succeed.
The reviewer cannot see what they are approving
An approval on a decision whose inputs are not visible is a signature, not a control.
If the relevant trace cannot be surfaced, fix that before building the gate.
Architecture
The approval is a step inside the workflow, not a wrapper around it.
Execution reaches the gate, persists its complete state durably, and stops.
A reviewer is notified, sees the specific decision and the inputs that produced it, and responds with one of three outcomes.
They can approve and continue, edit the proposed action and continue with the modification, or reject and route to an alternative path.
On response, execution resumes from exactly where it paused with the human input as part of its state.
Durable persistence at the gate is what makes this workable rather than fragile.
The run may pause for minutes or for three days across a weekend, and it must survive a deployment, a restart and a scheduler failure in the interim.
An in-memory pause is an approval gate that loses work whenever infrastructure changes, which is frequently.
Placing the gate mid-workflow rather than at the end is what makes the review meaningful.
The reviewer sees one decision with its immediate context, not a finished artifact with opaque provenance.
A rejection discards one step and its downstream rather than the entire run.
And the record that results is specific: this person approved this action, having seen this input, at this time.
That is a materially different claim from a timestamp on a completed job.
Components
| Component | Role | Technology options |
|---|---|---|
| Workflow engine with durable state | Pause and resume across restarts. | Airflow, Temporal, LangGraph with a checkpointer |
| Approval step | Halt execution, capture the decision and resume. |
Airflow approval operator, LangGraph
interrupt()
|
| State persistence | Survive restarts and deployments. | Metadata database, checkpointer backend |
| Review interface | Present the decision and its inputs. | Workflow UI, or a purpose-built review screen |
| Notification and routing | Get the correct reviewer’s attention. | Email, Slack, existing ticketing system |
| Timeout policy | Define what happens when nobody responds. | Engine-native timeout and escalation |
| Audit log | Immutable record of every approval. | Append-only table, SIEM export |
Tradeoffs
| Choice | What you gain | What it costs |
|---|---|---|
| Gate mid-workflow | Specific, reviewable decisions and partial rejection. | More gates to design and route. |
| Gate at the end only | Simple to build. | Reviewers approve with limited context and a rejection discards the entire result. |
| Durable pause | Survives restarts and long waits. | Requires a persistence layer and explicit state management. |
| Confidence-based gating | Only difficult cases reach a person. | Requires a calibrated confidence signal, which is real work. |
| Gate every case | Maximum oversight. | Throughput becomes limited by reviewer capacity. |
| Timeout auto-approves | Workflows never stall. | Defeats the control and is only appropriate for genuinely low-stakes steps. |
Implementation notes
Decide the timeout policy first
Decide what happens on timeout before building anything else, and treat it as a policy question rather than a configuration default.
Auto-approve keeps throughput up and quietly removes the control.
Auto-reject is safe and produces a backlog of failed runs.
Escalation is usually the right answer and requires a second named owner.
There is no neutral option.
Make the run idempotent up to the gate
Depending on the workflow engine, code before an interrupt may execute more than once when the workflow resumes.
Anything with a side effect belongs after the gate, not before it.
This constraint is easy to violate accidentally when another step is added later.
Keep the approval payload simple and serialisable
Rich objects do not always survive persistence reliably.
A gate that fails to resume because its saved state cannot be deserialised is a confusing failure to debug.
Measure the approval rate
Measure approval rate per gate and review it monthly.
A gate approving above roughly ninety-five per cent of cases is probably not doing useful work.
It may be a candidate for removal or for a confidence threshold that only escalates outliers.
A gate rejecting frequently indicates an upstream problem that should be fixed rather than filtered.
Log what the reviewer was shown
Do not record only the final decision.
When the approval is questioned later, the relevant question will be what information was available to the reviewer at the time.
A decision record without its inputs cannot answer that question.
Only gate decisions a reviewer can actually evaluate
Do not place approval gates on steps whose outputs a reviewer cannot meaningfully assess.
An approval on a decision requiring context the reviewer does not have produces a rubber stamp with an audit trail.
That is worse than no gate because it creates a false record of oversight.
References
-
Agentic workloads on Airflow: observable, retryable,
and auditable by design
— the argument for building agent workflows as
orchestrated tasks with an approval operator rather
than as an opaque reasoning loop. It also discusses the
acyclicity tradeoff directly.
Apache Airflow -
Introducing the Common AI Provider for Apache Airflow
— the operator set that makes agentic workloads
practical on Airflow across model providers and tools.
Apache Airflow -
Building human-in-the-loop agentic workflows
— practical treatment of LangGraph’s
interrupt()primitive, including idempotency constraints and interrupt handling.
Towards Data Science -
Architecting human-in-the-loop agents: interrupts,
persistence and state management
— covers checkpointers, state snapshots and thread
identity, which are the durability mechanisms this
pattern depends on.
Medium -
Orchestrating agentic AI with Airflow 3.1
— a practitioner account of approval gates inheriting
the orchestrator’s existing access control and audit
logging.
Medium
EXPLORE PATTERNS
Put human judgment at the decision that actually matters.
Explore practical data and AI architecture patterns built around production constraints, durable state, auditability and explicit operational ownership.