Designing for the gap between when a human consents and when the agent acts
Every human-in-the-loop agent design has a gap in it that almost nobody models. A human approves an action at time T. The agent executes it at time T+n. Between the two, the world moves. The approval is stored as a boolean — approved, not approved — and executed as though the conditions that justified it were still true.
This is the time-of-check-to-time-of-use (TOCTOU) problem, which systems engineering has known about for decades in the context of file permissions and shared state. Human approval of an agent action is a TOCTOU hazard with a much longer window: not microseconds between access() and open(), but minutes to days between a notification and a resume. And unlike the classic case, the check is performed by a person who has since gone to lunch.
A worked case makes the shape clear. An agent drafts a revised delivery forecast for a customer. The delivery lead reads it, agrees it is accurate, and approves sending it. Before the agent sends, an upstream dependency slips. The forecast is now wrong. The approval is still sitting in the queue, still valid as far as the system is concerned, still authorising an outbound message to a customer that states something false. Nothing in the system is broken. Every component did what it was told.
What the approval was actually for
The fix starts by noticing that "approved" is the wrong data type. When a person approves an action they are not issuing a bearer token. They are asserting a conjunction:
this specific action (not a class of similar actions)
with these specific arguments (this recipient, this amount, this file)
given these facts (the forecast says Q1, the dependency is on track, the customer is on plan Enterprise)
as of now
The first two are usually recorded. The third almost never is, and the fourth is recorded as a timestamp that nothing reads. So an approval decays silently: it keeps its authority long after it has lost its justification.
Once you see the approval as a conjunction, three controls follow directly.
1. Approved scope. Record the exact action and its arguments, and execute exactly that. This is the one most systems get right, and it is worth stating because the common failure is subtle: a resume payload that lets the operator edit the action on the way through turns the record of what was approved into a record of what was requested. If the human can rewrite the arguments at resume time, you no longer have an approval of a known action; you have a new unapproved action wearing the old one's authorisation.
2. Approval conditions. Write down which facts must still hold at execution. This is the control that does not exist in most stacks, and it is the interesting engineering problem, because it demands that the proposing agent make its assumptions explicit and checkable. "The dependency on task 1182 has not slipped" is a predicate you can evaluate. "The forecast is still accurate" is not. The discipline of writing conditions forces the vague ones to become specific or be dropped.
3. Reapproval trigger. Evaluate the conditions immediately before the side effect, not at approval time, and halt if any has changed. Then route the revised action back to the accountable owner — which is a design decision in itself, discussed below.
Where the stacks actually stand
It is worth being precise about what today's tooling does and does not give you, because the gap is not where you would expect. It is not that nobody has noticed. It is that noticing has not turned into mechanism.
At the protocol layer, there is nothing. The Model Context Protocol's elicitation flow is the standard way for a server to ask a human for something mid-operation: the server sends an elicitation/create request, the client presents it, and the response carries one of three actions — accept ("User explicitly approved and submitted with data"), decline, or cancel. The specification is deliberately unopinionated about presentation: "the protocol itself does not mandate any specific user interaction model." What it has no vocabulary for is any of the following: an approval that expires, an approval bounded to conditions, an approval that must be re-requested because circumstances moved. The spec is silent on the gap between consent and execution. An accept is a flat fact with no attached predicate and no shelf life.
This matters more than it sounds. A protocol that cannot express a conditional approval guarantees that every implementation which wants one has to build it above the protocol, privately, incompatibly. The approval semantics end up in application code, where they cannot be audited by anything that speaks the protocol.
At the orchestration layer, it is documented as advice. LangGraph's interrupt-based human-in-the-loop support is explicitly unbounded in time: the graph "waits indefinitely until you resume execution with a response," which "supports asynchronous human review or input without time constraints." That is the right primitive and it is also precisely the condition under which approvals rot.
To its credit, the documentation says so. Its guidance on side effects after a long pause is to "re-read external state (price, inventory, policy) before the mutating side effect," and states plainly: "Do not assume the pre-pause world is still valid." It goes further on the semantics of a returning operator, advising that you "treat the resume value as acknowledgement that the operator returned, not as the approval decision itself" — which is exactly the distinction between a person being present and a decision being valid. And on the editing hazard above, it is unambiguous: "A changed request needs a new governed job, not a resume payload that rewrites the original."
But all of that is prose in a docs page. The runtime enforces none of it. Resume values can be validated for shape — pass a Pydantic model, a TypedDict or a dataclass and invalid input raises a validation error — and that is the extent of the machinery. There is no way to attach a world-state invariant to an interrupt and have the runtime refuse to proceed when it no longer holds. The mechanism validates the human's typing. The conditions that actually matter are left to whatever the developer remembers to re-check inside the node.
So the state of the art is: one layer is silent, and the layer above it tells you the right thing to do and then trusts you to do it. That is a reasonable place for a young ecosystem to be, and a bad place to leave a system that sends things to customers.
Design consequences
Conditions belong with the proposal, not the approval UI. The agent proposing an action is the only party that knows which facts it relied on. If conditions are authored by the human at approval time, they will be generic ("nothing major changed") because the human is reviewing an output, not a derivation. Make the proposing step emit its predicates alongside its proposal, and the approval record becomes the conjunction of action, arguments and predicates, captured in one place.
Re-evaluate at the side effect, not at resume. Resume and execution are not the same moment, and in a queued system they can be far apart. The check belongs as late as possible — immediately before the irreversible call — for the same reason you validate at the boundary rather than at the form.
Decide pause-versus-flag per action, by reversibility. The commenter's question on the original framing is the sharp one and the framing does not answer it: when a condition breaks, does the agent halt automatically, or proceed while flagging? The honest answer is that it depends on the cost asymmetry of the specific action. For an irreversible outbound effect — an email to a customer, a payment, a deletion — halting is correct even when it is usually unnecessary, because a stale send cannot be unsent. For a cheap, reversible, idempotent effect, halting on every condition flutter produces exactly the approval fatigue that makes humans rubber-stamp, which costs you more safety than the stale execution would have. Encode the choice per action class rather than globally.
Watch the condition set's own staleness. A conditions list is code, and like any guard list it rots as the workflow changes. A condition that silently stops being evaluable — the field it reads was renamed, the upstream system no longer reports it — is worse than no condition, because the approval now carries a guarantee nobody checks. Fail closed on an unevaluable predicate, and alert on predicates that have never once fired.
Re-approval is a new decision, not a nag. When the agent routes a revised action back, the owner needs the diff — what changed, which condition broke, what the action now is — not a repeat of the original request. A re-approval presented as the same prompt invites the human to approve from memory, which defeats the whole mechanism.
Failure modes
| Failure | Why it happens | What it costs |
|---|---|---|
| Approval as bearer token | Boolean stored, conditions never recorded | Stale action executes with full authority |
| Conditions checked at approval time | Natural place to put the check, wrong moment | The check always passes; the gap is unguarded |
| Operator edits at resume | Convenient UI affordance | The audit trail records an approval of an action that was never approved |
| Halt on every change | Safety reflex applied uniformly | Approval fatigue, then rubber-stamping, then worse safety than before |
| Unevaluable predicate treated as satisfied | Default-true guard logic | Silent loss of the guarantee, with the record still claiming it |
| Re-approval shown as the original prompt | Reuse of the approval UI | Human approves from memory; no second look |
Review checklist
For any workflow where an agent executes something a human approved:
Is there a recorded gap? Measure the actual distribution of approval-to-execution latency. If the p95 is minutes or more, the gap is real and nothing in the system models it.
For each approved action, list the facts that would have changed the human's answer. Any that are not machine-checkable either need to become checkable or need the action moved out of automation.
Where are those facts evaluated — at approval, at resume, or immediately before the side effect? Only the third is correct.
Can the operator alter the action at resume? If yes, what is in the audit record: the approved action or the edited one?
Per action class, is a broken condition a halt or a flag? Is that choice written down and justified by reversibility, or is it whatever the first implementation did?
What happens when a predicate cannot be evaluated? Confirm it fails closed.
Has each predicate ever fired? A guard that has never triggered across thousands of runs is either unnecessary or broken, and you cannot tell which without checking.
Does a re-approval show the diff and the broken condition, or does it show the original request again?
Related reading
The nearest existing treatment of this problem is in code review rather than general agent action: an automated reviewer whose approval is withdrawn and re-run on every new commit is an approval-invalidation mechanism, built for one domain where the invalidating event (a push) is unambiguous and cheap to detect. The general case is harder precisely because the invalidating event has to be named in advance.
The adjacent literature on gating irreversible actions — approval prompts reserved for effects that cannot be undone — gets the reversibility axis right while leaving the time axis unmodelled. The two combine well: reversibility decides whether you ask, and condition staleness decides whether the answer is still good.
The operational-governance material on auto-approval policy is the other neighbour: it is concerned with which actions may skip a human at all, and it generally assumes that when a human does approve, the approval means what it said. That assumption is the one examined here.