Pattern 12 · Control

Human-in-the-loop confirmation

Agents that act first and apologise later lose permission to act at all.

By Alex StepikinUpdated October 20263 min readLive demo
Live demo · try it

An interactive mock built in plain HTML, CSS and JavaScript. Data is fictional; no model is called.

FitWhen to use it — and when not

Use it when

  • The action cannot be undone (send, pay, delete, publish)
  • The action affects other people or costs money
  • The agent made a judgement call the user may disagree with

Skip it when

  • Easily reversible actions — use undo instead
  • Purely informational steps
  • Repeated low-risk actions where trust is established (offer "always allow")

AnatomyThe parts of the pattern

  1. ProposalOne sentence: what will happen, to whom, how many.
  2. DetailsPreview of content, affected items, cost, reversibility.
  3. ChoicesApprove, edit, cancel — plus "always allow" where safe.
  4. ExecutionProgress and the real outcome, including partial failures.
  5. AuditWho approved what, when.

GuidelinesDo & don’t

Do

  • Say exactly what happens: "Send to 50 customers" not "Proceed?".
  • State reversibility in plain words.
  • Offer edit, not only yes/no.

Don’t

  • Ask on every trivial step — people learn to click yes blindly.
  • Stack several dialogs for one action.
  • Show UUIDs and byte counts instead of a human summary.

From my projectsApprovals in production

Vigilo — risk alert

Proposal

Raise the country risk to 4/5 and send a red alert

Affected

342 travellers in the region

Evidence

Analyst track record: 94% accuracy

Choices

Send alert · Review data · Downgrade to yellow · Hold

EngiBoard — production deploy

Proposal

Deploy to production on all 4 platforms

Changes

6 commits · 156/156 tests passing

Reversible

Yes — previous version tagged for rollback

Choices

Deploy · View changes · Re-run tests · Cancel

Also used in Navigator.Taxi: before an agent locks a vehicle for overdue maintenance, the fleet manager sees the driver, reason, downtime and can notify the driver first.

In the wildReal-world examples

Claude CodeCursor agentChatGPT agentGitHub Copilot coding agent

Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.

For engineersImplementation notes

  • Model risky tools with a "requires_approval" flag; the agent loop pauses and emits a pending action instead of calling the tool.
  • Store the approval (who, when, exact payload hash) and execute exactly that payload — never a re-generated one.
  • Escalate to a person after repeated rejections instead of asking again.

ControlRelated patterns

All 26 LLM UX patterns

Building an AI product?

I design and ship AI products end to end — LLM interfaces, agents, RAG, billing — from concept to a live product in weeks, not quarters. Tell me what you are building and get a fixed estimate.

Get an estimateBook a call

Create bold.
Deliver better.

See our workGet in touch