Approvals that nobody answers need a policy. Choose expire, escalate or apply with review per risk class, enforced by durable timers and one state transition.
The approval nobody answered
Most guides about human approval for agent actions describe the happy path: the agent proposes, a person approves or denies, the workflow continues. The case that decides whether the design holds up is the one where nobody answers. The approver is in a meeting, on leave, or looking at a queue of forty other requests. The workflow cannot wait forever, and whatever it does when the wait ends is a policy decision that someone made, deliberately or by accident.
Existing workflow systems have always had this problem. Purchase approvals escalate to a manager after two days; change requests lapse at the end of a maintenance window. Agents make it sharper in two ways. They produce many more requests, so an approver's backlog grows faster than before. And agent code is often written with a plain loop that awaits an answer, so the timeout behaviour is whatever the HTTP client or the session store does when it gives up. This guide argues for making the timeout outcome an explicit, per-risk-class decision, enforced by a durable timer and a single state transition.
Three outcomes, chosen by risk
When an approval deadline passes, there are only a few sensible outcomes.
- Expire and deny. The request ends, the action does not happen, and the requester or the agent is told why. This is the safe default for anything irreversible.
- Escalate. The request moves to a second approver with a new, shorter deadline. Escalation is useful when the action is time-sensitive and someone else can judge it; it needs a final outcome of its own when the second deadline also passes.
- Apply with review. The action runs, and a person reviews it afterwards. This is only defensible for actions that are reversible, bounded in size, and have an automatic undo. A store credit below a limit qualifies; a refund to a card does not, because the money leaves.
Approve-on-timeout without those conditions turns a busy approver into an unconditional yes. It is the most common hidden failure in these designs, because it looks like good service until the first wrong action goes through.
Worked example: one morning at the returns desk
Belgavi's Book Store routes three kinds of agent-proposed actions to approvers. Small store credits are low risk; refunds to the original payment method are medium; deleting a customer account on request is high, because it cannot be undone. The policy below is an input to the companion example approval_timeout_policy, and the table is its output for eight synthetic requests, all raised at 09:00. Reviewer A approves the first line; Reviewer B is the escalation approver.
| Class | Deadline | On timeout |
|---|---|---|
| Low: store credit under the limit | 60 minutes | Apply, then review within a day |
| Medium: refund to the card | 120 minutes | Escalate to a second approver for 60 minutes, then deny |
| High: delete the account | 240 minutes | Deny; the request must be raised again |
| Request | Class | What happened | Outcome |
|---|---|---|---|
| CASE-5101 | Low | Approved at 09:20 | Approved |
| CASE-5102 | Low | No answer | Applied at 10:00, queued for review |
| CASE-5103 | Medium | Denied at 10:30 | Denied |
| CASE-5104 | Medium | No answer by 11:00; Reviewer B approved at 11:30 | Approved after escalation |
| CASE-5105 | Medium | No answer from either approver | Denied at 12:00 |
| CASE-5106 | High | Approved at 13:10, after the 13:00 deadline | Expired; the late approval is recorded and ignored |
| CASE-5107 | High | Approved at 12:59, one minute before the timer | Approved |
| CASE-5108 | Medium | Escalated at 11:00; Reviewer A approved at 11:01 | Approved; the first approver stays eligible |
Four requests were approved by a person, one ran under the apply-with-review rule, two were denied and one expired. The two interesting rows are CASE-5106 and CASE-5107. In the first, a real approval arrived ten minutes late. The workflow had already told the requester the request expired, so acting on the late answer would contradict what the system said. In the second, the approval and the timer arrived within a minute of each other; exactly one of them must win.
One state transition decides
The approval is a record with a state: pending, escalated, approved, denied, expired or applied. Every event, whether an answer from a person or a timer firing, tries to move it from an expected state to a new one with a conditional update. Lock the approval row, read the trusted database clock, verify the actor and proposal version, then apply the eligible transition. An answer is valid only before the deadline; equality belongs to timeout. A delayed timer must not let a late answer win. Version checks stop an answer for an earlier proposal or escalation stage being applied to a later one.
-- A person approves: only valid while the request is still open.
UPDATE approvals
SET state = 'approved', decided_by = :approver, decided_at = :now,
version = version + 1
WHERE id = :id AND state IN ('pending', 'escalated')
AND deadline > :now AND version = :expected_version;
-- Resolve :now from the trusted database clock after acquiring the row lock.
-- Verify the authenticated approver against the current allowed approver set.
-- The first timer fires: escalate medium requests, close the rest by class policy.
UPDATE approvals
SET state = CASE risk_class WHEN 'medium' THEN 'escalated'
WHEN 'low' THEN 'applied'
ELSE 'expired' END,
version = version + 1,
deadline = CASE risk_class WHEN 'medium' THEN deadline + INTERVAL '60 minutes'
ELSE deadline END
WHERE id = :id AND state = 'pending' AND deadline <= :now
AND version = :expected_version;A row count of zero means the state, deadline or version no longer permits that event. For a delayed sweep, process already-expired escalation stages immediately; do not grant fresh time because the worker restarted late. Persist any action intent in the same transaction and dispatch it through an idempotent worker, so a crash between approval and execution cannot silently lose or repeat the action. The handler that lost reports what it saw instead of acting. A late approval that finds the state expired is stored as an audit fact and the requester is told that the request must be raised again.
The timer itself has to survive restarts. Use the scheduler you already trust for long waits: a durable timer in a workflow engine, a delayed message on a queue with a deduplication key, or a periodic sweep that selects pending approvals past their deadline. A sleep inside the agent process is not a timer; it disappears with the process. Timers should be idempotent because they may fire twice, and the conditional update above makes a second firing harmless.
What stays deterministic
The policy table, the deadlines, the transitions and the timers are configuration and code. The agent proposes the action and can draft the explanation shown to the approver, but it does not choose the risk class of its own proposal; the class comes from the action type and amount, looked up by the harness. It does not decide what happens on timeout either. If a model could relabel a card refund as a store credit, the apply-with-review branch would become a way around approval.
Migration steps for an existing approval flow
- Inventory the actions agents can request and assign each a risk class from its reversibility and size, not from the model's confidence.
- Write the timeout outcome for each class down as data and review it with the people who own the actions.
- Move waiting out of the agent process: persist the approval record, then schedule a durable timer for its deadline.
- Replace direct state writes with conditional updates for every event, and log the losing events.
- Add reminders before the deadline and a visible queue age, so approvers see the clock.
- Report daily counts per class of approved, denied, escalated, expired and applied-with-review, and the median time to decision.
Failure modes to design for
- Deadlines measured in wall-clock time while approvers work business hours. A request raised at 17:55 with a 60-minute deadline expires overnight. Either compute deadlines on a business calendar or route out-of-hours requests to an on-call approver.
- Escalation chains with no final outcome. Every chain needs a terminal state when the last deadline passes.
- Apply-with-review queues that nobody reviews. Alert when the review backlog grows, and stop applying when it exceeds a limit.
- Notifications that show the request but not its deadline. An approver who does not know a request is about to expire cannot prioritise it.
- Timeouts that leave the agent waiting. When the request expires, the workflow should resume with a clear result the agent can report to the customer.
When an agent is unnecessary
If a class of request is always approved after the deadline anyway, the approval adds delay and no control. Either remove the approval for that class with explicit limits, or replace the agent's proposal with a rule that applies within those limits. Approvals are worth their cost where a person regularly changes the outcome.
How to verify it
Drive the state machine with recorded event sequences: an answer before the deadline, a timer before the answer, both in the same second, a second timer firing, a late answer after expiry. Assert the final state and the audit trail for each. The companion example runs the eight requests above and checks that every outcome matches the table.