contenox

AI agent approval workflow: durable asks, one verdict

Updated · Facts checked

SAFETY AND CONTROLApproval workflow

An AI agent approval workflow decides what happens when a tool call hits a rule that says ask first. The durable pattern is not a pop-up: the engine writes the ask to storage, checkpoints the run, and only then lets a surface render it. The answer is recorded once, by compare-and-swap, and the run resumes once, whichever surface answered.

Row first, screen second

A prompt drawn before the ask is persisted has three failure modes. A restart loses every pending ask. Two surfaces can answer the same call. A resumed run can execute the same step twice.

Persisting first removes all three:

  • A crash loses nothing. The ask is already on disk, so a restart still finds it pending.
  • The verdict is recorded once. A row becomes final exactly once. If two people tap Allow at the same moment, one write wins and the other is told it lost.
  • The run resumes exactly once. The verdict lands on the row, the checkpoint picks it up, and the agent continues from where it stopped. The surface that answered does not matter.

The same order decides what a surface may do. A surface renders a row and sends an answer; it does not own the decision. If the window closes, the ask stays open. If a client cannot draw the card, the agent stays stopped rather than choosing another tool the policy happens to allow.

What an ask contains

An ask is a row with a title, the agent, the machine, the call that was stopped, the rule that stopped it, and a deadline. If nobody answers by the deadline, the ask is refused. A policy where silence means allow is rejected at configuration time, so a forgotten ask fails closed.

An ask also has to stop the agent, not just notify someone. An approval that arrives as a notification while the agent keeps reasoning is not a gate; it is a suggestion.

The states a card shows

State What the card says Why it exists
Waiting Allow and Deny, or a text box The normal case
Answered here What you decided, kept on screen So your own confirmation never vanishes
Answered elsewhere “Answered somewhere else.” Another person or surface got there first
Restricted “Only an owner of this account can answer this.” The rule names a role you do not have
Suspended “Nothing has been sent to the machine. The ask is still open on it.” The account cannot answer right now
Expired The machine stopped waiting The deadline passed

A relay drops a settled ask from its list the instant it settles. A surface that removes the card at that moment deletes something a person may still be reading, and says nothing about why. Keep the card, mark how it closed, and hold it until the page reloads.

One case is easy to get wrong. When the person taps Allow, the machine closes the row and sends “answered” back a moment later. A surface that treats that message as the decision replaces “Allowed, the agent is going ahead” with “Answered somewhere else” on the one card that was answered locally. The local verdict wins over the echo of it.

“First answer wins” only works if every surface that can answer can also ask. A plain HTTP client with no way to show a card must not answer “cancelled” to every approval, sometimes before the person in the browser can click.

Who may answer

Anyone can be asked. Not everyone should count. Two settings decide it:

  • Which agents may interrupt you. A subscription names an agent, not a machine, so it covers every machine the team owns for that agent.
  • Approval rules. How many different people must approve before the machine is told, and which role counts. An account-wide rule applies unless an agent has a rule of its own. Only an owner or an admin can change one.

A rule can require two different people. An answer that only counts toward a quorum should show as counted, not as done, so nobody thinks one tap released the money. The card should never offer a button that is certain to be refused: a control that fails with a 403 is worse than a sentence saying whose job it is.

When the machine is offline

The agent runs on a paired machine, not on the relay. The relay carries asks between that machine and the browser and does not store them.

Three consequences:

  • An offline machine shows no asks. The row lives on the machine. When it reconnects it republishes its open asks, newest first and bounded, so a machine holding more than the limit brings back only the newest.
  • An answer to a machine that is not connected is kept. Nothing counts as applied until the machine confirms it.
  • A closed laptop is not a stuck run. The run checkpoints beside the pending row. Answer later, from any process that can reach the models, and it resumes where it stopped.

A host that disconnects is a failed observation. It is not evidence that the work stopped, finished, or is still running.

Billing states that gate answers

Asks can sit behind a subscription, so billing can stand between a person and an answer. Three states, and the difference matters:

  • Grace. A payment failed and is inside its retry window. Entitlement is kept and every card still answers normally. A banner says a payment failed and offers the billing page to an owner or admin.
  • Lapsed. The entitlement is already dropped, and the relay refuses every answer with a 403.
  • Suspended. An operator suspended the account. That is separate from billing, so the card says so and mentions no invoice, because paying is not the remedy.

When an account is lapsed, a dismissible banner above a column of Allow buttons is not enough. Every button answers 403 and says nothing. The card itself has to say it cannot be answered and offer no button.

Should a second agent answer routine asks?

Unattended agents stall. A run starts, nobody is watching, and it comes back waiting on a question its own instructions already answer. A reviewer agent can decide the routine ones: answer or wait for a question, and optionally approve, deny or wait for a gated call.

Four rules keep that honest:

  • A reviewer may be faster than a person, never more permissive than the rule.
  • Every verdict records who decided it. A reviewer’s decision is never anonymous.
  • Budgets are durable. A fixed number of questions and gated calls per mission, then everything waits for a person. Zero is zero, not unlimited.
  • A question is a symptom. An agent that raises enough routine questions to need a filter has a vague intent. The fix is a sharper task, not a second model reading the overflow.

The distinction matters most for gated calls. A subagent hitting an approve rule is the rule working as designed. No better policy removes that interruption, because the only way to remove it is to move the call to allow, which is the blanket permission the rule was meant to prevent. Only a per-call judgment can decide it.

A reviewer also costs one model call per ask reviewed, including the asks it declines to decide.

What this does not solve

  • A person still has to answer. A durable ask can be answered from anywhere. It does not make anyone read it before tapping Allow. Approval fatigue is a human problem, and a phone makes it easier to tap through.
  • A reviewer is a model. It judges a call against an intent. A vague intent gets vague rulings, and a rule nobody wrote cannot be enforced by a reviewer.
  • Failing closed is still a stop. A refusal on timeout is safe, and it can leave a mission halted overnight over a question a person would have answered in ten seconds.
  • It records who decided, not whether they were right. A recorded verdict is not evidence that the verdict was correct.

Where this fits

Contenox applies the same idea on one machine: the agent works in a project, and what it may do without asking is a set of rules that can be read. Get it for Windows from the Microsoft Store.

Related

Esc to close