Library / Working with a coding agent / Human in the loop
No. 154·noun·also called approval gate, permission prompt, approve before it runs

Human in the loop

A checkpoint where an AI agent or automation stops and waits for you to approve, edit or reject its next action.

SPECIMEN · DIAGRAM · STATES
Agent proposes
Waiting for you
Running
Done
Rejected
risky actionsafe actionyou approveyou declinefinishes
Definition

What it is

Human in the loop means a person sits at chosen points in an automated process. The agent proposes an action, such as running a command, deleting files, sending an email or spending money. It then pauses until you say yes, change it, or say no. Anything you have not flagged runs on its own.

The skill is deciding where to put the pauses. Approving everything wears you out and you stop reading. Approving nothing is how an agent sends a wrong email to your whole list. A good rule is to require approval for actions that are hard to undo, cost money, touch real customers or involve secrets, and to let safe, reversible work run freely.

It applies to the agent you direct and to automations you build. It is not a confirmation dialog, which is a screen your app shows your own end users before they delete something.

Say it like a builder

How to ask for it

Vague

“I want the automation to handle support emails, but I'm nervous it'll say something wrong to a customer.”

Precise

“Build the support reply workflow with a human in the loop: the agent drafts each reply and saves it as pending. Nothing is sent until I approve it, and I can edit the draft first. Low-risk replies like order status can send automatically after a week of approvals with no edits.”

Why it works

"Nervous it'll say something wrong" has no fix attached; "human in the loop" names a pause-and-approve design and the prompt says which actions wait, who approves, and when the pause can be relaxed.

In the wild

You've seen this in

  • CClaude Code asking whether it may run a command before it does
  • CCursor showing proposed edits for you to accept or reject
  • CChatGPT's agent pausing for you to confirm before a sensitive step
Usage note

Often confused with