Human in the Loop AI: What It Means and Where to Put the Human
Human in the loop AI is a setup where a person takes part in an AI system's work: labeling its training data, correcting its outputs, or approving its actions before they take effect. For AI agents, it usually means the agent pauses at set points, such as a deploy, a delete or a payment, and waits for a named person to say yes or no.
Most guides on this query explain the machine learning side well: labeling, feedback, RLHF. Few go further. Our team runs coding agents on real tickets every day, so this guide covers both sides and spends its depth on the part that is changing fastest: where the human sits when an agent can act on its own. Every tool setting below was checked against the vendor's docs on November 11, 2026.
Key takeaways
- Human in the loop (HITL) means a person must act before the AI's output counts. Human on the loop means the AI acts and a person watches and can step in.
- In agent tools the loop is a setting: Claude Code has six permission modes, and OpenAI Codex has an approval policy (for example
on-request,neverorgranular). - Gate few actions, and gate them hard: deploys, deletes, outbound messages, money, secrets and anything a customer sees. In our small sample, 6 of the 7 decisions our agents recorded needed no sign-off.
- The slow part is rarely the AI. Our agents' clocks paused 58 times while they waited on a person or a deploy, and one 14-step human handoff still has no step ticked after 8 days.
- Record each approval next to the work it approved: who asked, who decided, why, and what else was considered.
What is human in the loop AI?
Human in the loop AI is any AI system in which a person is a required step: the system cannot finish a task, or cannot learn, without human input. IBM puts it this way:
"Human-in-the-loop (HITL) refers to a system or process in which a human actively participates in the operation, supervision or decision-making of an automated system." (IBM)
Stanford HAI's glossary is shorter: HITL "refers to AI systems that include human feedback or intervention as part of their operation" (Stanford HAI).
The "loop" is a cycle. The AI produces something. A person reviews it, then approves, edits or rejects it. That decision either lets the action go ahead or goes back into the system as feedback.
How does human in the loop work?
Humans can enter the loop at five points, from training to after the fact. The first three shape the model; the last two govern what the model does once it is live.
| Stage | What the human does | Example | Who usually does it |
|---|---|---|---|
| Data labeling | Tags examples so the model learns patterns | Marking emails spam or not spam | Annotators, domain experts |
| RLHF | Ranks model answers so it learns preferences | Picking the better of two chatbot replies | Trained raters |
| Active learning | Labels only the cases the model is unsure about | Reviewing low-confidence scan results | Specialists |
| Runtime approval | Approves or rejects an action before it runs | Signing off on an agent's production deploy | The owner of the system |
| Post-decision audit | Reviews finished actions for errors and drift | Sampling closed tickets each week | A lead or compliance team |
Google Cloud, Stanford and most of the top results stop at the first three rows. If you run AI agents, rows four and five are the ones you will configure this week.
What are examples of human in the loop AI?
| Field | What the AI does | Where the human steps in |
|---|---|---|
| Healthcare | Flags suspect scans | A radiologist confirms or overrules each flag |
| Finance | Holds a large transfer as possible fraud | An analyst approves or blocks it |
| Content moderation | Marks borderline posts | A moderator makes the final call |
| Customer support | Drafts a reply to an upset customer | A support lead approves it before it is sent |
| Coding agents | Prepares a migration or deploy | The data or service owner approves before it runs |
What is the difference between human in the loop and human on the loop?
In the loop, the human must act before anything happens. On the loop, the AI acts by itself and the human monitors and can override it. Out of the loop, nobody reviews individual actions at all. Databricks gives the cleanest one-line version:
"Human in the loop (HITL) means the AI pauses and waits for a person to review or approve a decision before taking action." (Databricks)
| Mode | Human role | Timing | Coding-agent example | Fits |
|---|---|---|---|---|
| Human in the loop | Approves each gated action | Before it runs | Agent proposes git push to main and waits |
Deploys, deletes, money, customer-facing sends |
| Human on the loop | Watches, steps in by exception | While or after it runs | Agent edits files freely; you review the PR | Routine code changes behind review |
| Human over the loop | Sets policy, audits samples | Periodic | Monthly review of agent cost and rework per ticket | Mature, low-risk task types |
| Out of the loop | None per action | Never | Agent formats code and fixes lint | Reversible, low-stakes chores |
Most teams use all four at once. Decide per action which mode applies, and write the list down where agents and reviewers can both read it.
Is human in the loop agentic AI?
No, but production agents usually include it. Agentic AI plans and acts with tools; human in the loop adds a required yes before some of those actions, such as a deploy. Remove the gates and the same agent runs unattended.
The protocol most agents use to reach tools already expects that human. The Model Context Protocol (MCP) tool specification says:
"For trust & safety and security, there SHOULD always be a human in the loop with the ability to deny tool invocations." (MCP specification)
Here is where the loop lives in the tools engineering teams use today, as of November 2026:
| Tool | Where the human gate is | Setting to know |
|---|---|---|
| Anthropic Claude Code | Permission modes plus allow, ask and deny rules | default (labeled Manual) asks on first use of each tool; explicit ask rules still prompt even in bypassPermissions |
| OpenAI Codex | Approval policy plus sandbox mode | approval_policy = "on-request"; granular keeps some prompt types interactive; the old untrusted policy is retired |
| LangGraph | interrupt() pauses a graph node; a checkpointer saves state until you resume |
Needs a thread_id so the paused run can be found again |
| Temporal | Durable workflow waits for a signal from a person | Can wait hours or days without holding compute |
| Microsoft Agent Framework | Request and response through a RequestPort |
Executors send a request out and wait for the answer |
Two changes worth knowing if you set these up last year. OpenAI's Codex docs now live on learn.chatgpt.com, state that "Codex and ChatGPT Work no longer support approval_policy = "untrusted"", and add approvals_reviewer = "auto_review", which routes eligible approval requests through a reviewer agent instead of you. Claude Code now lists six modes, including auto, where a background classifier checks actions instead of a person, and dontAsk, which denies anything that would have prompted. In both tools, "auto" means a second model checks the action, so for that step no person is in the loop.
Which agent actions need a human?
Put a person in front of any action you could not undo by Friday, and in front of anything a customer will see. Leave the rest on the loop or out of it. When every action asks for approval, people stop reading the prompts.
Copy this gate matrix and edit the right-hand column for your team:
| Action | Mode | Why | Who approves |
|---|---|---|---|
| Deploy or push to a protected branch | In the loop | Reaches users at once | Service owner |
| Delete data, drop a table, run a migration | In the loop | Hard or impossible to undo | Data owner |
| Send email, post, message a customer | In the loop | Public and permanent | Owner of the channel |
| Spend money, change billing, buy credits | In the loop | Real cost | Budget holder |
| Read or rotate secrets | In the loop | Security exposure | Security lead |
| Pick a library or approach | On the loop | Reversible, visible in review | Reviewer of the PR |
| Edit code in a branch | On the loop | Caught at code review | Reviewer of the PR |
| Format, lint, rename, write tests | Out of the loop | Cheap to redo | Nobody per action |
A small sample points the same way. Since late October, Claude Code has logged 7 decisions on our tickets, each with its reason and the alternatives it considered. Six were routine design choices that needed no sign-off. A gate on all seven would have taught us to click yes without reading.
How do you set up approval gates in Claude Code and Codex?
Put the gate in the tool's config file, so it holds no matter who starts the session. In Claude Code that is .claude/settings.json; in Codex it is config.toml.
A starting point for Claude Code, using the rule syntax from its permissions docs:
{
"permissions": {
"allow": [
"Bash(npm run test *)",
"Bash(npm run lint *)",
"Bash(git commit *)"
],
"ask": [
"Bash(git push *)",
"Bash(npm publish *)",
"Bash(terraform apply *)",
"Bash(kubectl *)",
"mcp__stripe__*"
],
"deny": [
"Bash(git push --force *)",
"Read(./.env)",
"Read(./secrets/**)"
]
}
}
Two details from the docs matter here. First, explicit ask rules are among the "actions no mode auto-approves", so they still prompt in bypassPermissions. Second, rules match the command text: the docs show that Bash(git push *) does not match git -C . push origin main. Protect the branch on the server as well; a pattern is not a wall.
The Codex equivalent for ~/.codex/config.toml, from OpenAI's approvals page:
sandbox_mode = "workspace-write"
approval_policy = "on-request"
approvals_reviewer = "user"
OpenAI describes the policy as the setting that "controls when it must stop and ask you before acting". Keep approvals_reviewer = "user" for repos that deploy, since "auto_review" hands the decision to a reviewer agent.
Where should the approval live?
An approval should live with the work it approved, not only in the terminal where it was clicked. A yes typed into a Claude Code prompt is gone when the session ends. Three weeks later nobody can say who approved the migration, or what else was on the table.
Write each gated decision down in a fixed shape. This is the template we use; paste it into a ticket, a PR description or a doc:
### Decision: <one line, what will happen>
- Ticket: <ref> - Agent and model: <e.g. Claude Code, claude-opus-5-5>
- Why: <the reason in one or two sentences>
- Alternatives: <option A>, <option B>
- Risk: <what breaks if this is wrong, and how to undo it>
- Needs approval: yes | no
- Approver: <name> - Result: approved | rejected
- Note: <required when rejected>
- Date: <YYYY-MM-DD>
This is the problem we built Jenzo for. It is a ticket tracker where AI agents open, update and close tickets themselves over MCP or the API. An agent logs each real choice to an append-only decision log with the reason and alternatives. Risky ones are flagged as needing approval: they show up in the person's waiting list, the agent is told not to act until approved, and the approval tool's instructions forbid an agent from approving its own request. Rejecting needs a note.
Two more pieces cover the other ways an agent waits. When it needs an answer, it marks the ticket as waiting on a human with the question, and its work clock pauses. When it has done its part but a person must send, pay or publish, it hands off a checklist of the human steps. A ticket also cannot close without proof, a link or a real closing report, and that rule applies to agents and people alike. For the wider view of running agents as part of the team, see our guide to the AI agent management platform category and how to give Claude Code tasks as tickets.
What did we learn from keeping humans in the loop on our own agents?
In our workspace, the human side was usually slower than the agent side. We pulled these numbers from our own workspace on November 11, 2026.
- Our agents' work clocks paused 58 times while an agent waited: 57 times on a teammate, once on a deploy.
- Agents handed 4 tickets to a person with 36 human steps between them. 16 are ticked.
- One of those, a 4-step handoff, sat for four days. Jenzo sends a single reminder after 2 days without activity, and it went out on the fourth morning. All 4 steps were ticked and the ticket closed itself 36 minutes later.
- A 14-step handoff from the same week still has 0 steps ticked after 8 days.
- 216 closes passed with proof attached, and 25 closing notes were refused as too thin and had to be rewritten.
What surprised us: the waiting cost more than the gating. An approval that nobody sees is a stalled agent, so the request has to land in a queue a person checks every day, with one reminder and no more.
What are the benefits of human in the loop AI?
Human review improves accuracy, assigns accountability and helps meet oversight rules. A person catches edge cases the model has not seen, a named approver owns each risky decision, and a logged review is evidence for auditors. For agents there is a fourth gain: a person can stop a bad action before it reaches users, which retraining cannot do after the fact.
What are the downsides of human in the loop?
Human review adds delay and cost, and people get worse at it the more they do. Databricks lists latency and cost, "vigilance decay", inconsistent judgment and oversight that turns "performative" when reviewers cannot follow what the AI did.
Four rules keep a loop honest:
- Gate by risk, not by habit. Use the matrix above. Fewer prompts get read more carefully.
- Show the evidence with the request. The diff, the command, the cost and the undo plan, on one screen.
- Name one approver. "The team" approves nothing.
- Measure the wait. Track how long requests sit. If the median grows, cut gates or add approvers.
Feedback works when it is targeted. Databricks reports that in one case study, a Q&A agent's ability to follow expert instructions "improved from roughly 12% to 80% using just 32 pieces of human feedback."
What do the rules say about human oversight?
The EU AI Act makes human oversight a legal duty for high-risk systems. Article 14 states:
"High-risk AI systems shall be designed and developed in such a way, including with appropriate human-machine interface tools, that they can be effectively overseen by natural persons during the period in which they are in use." (EU AI Act, Article 14)
Paragraph 4 adds that overseers must be able "to intervene in the operation of the high-risk AI system or interrupt the system through a 'stop' button".
A coding agent on your repo is unlikely to be a high-risk system under the Act, which lists uses such as hiring, credit and critical infrastructure. Even so, Article 14's test is a useful bar: can a named person see what the system is doing and stop it? In the US, the NIST AI Risk Management Framework is voluntary guidance, and NIST notes that "The AI RMF 1.0 is being revised as part of the White House AI Action Plan."
How do you add a human in the loop to your agents this week?
Start with one repo and one agent, then widen.
- List what your agents can touch. Repos, shells, MCP servers, cloud accounts, email and payment tools.
- Fill in the gate matrix. Mark each action in, on, over or out of the loop, and name the approver.
- Write the config. Claude Code
askanddenyrules, Codexapproval_policy, branch protection on the server. - Pick where requests land. One queue each approver checks daily, not a chat thread.
- Log every gated decision with the template above, tied to the ticket or PR.
- Review after two weeks. Count approvals, rejections and median wait. Drop gates nobody ever rejected; add one for every incident.
If you already track agent work in tickets, our AI task manager comparison covers which trackers let agents work tickets directly, and our AI project management guide covers planning work that agents share with humans.
FAQ
What is human in loop in AI?
Human in the loop in AI means a person is a required step in how the system works. The person may label training data, rank answers, correct outputs or approve actions before they run. For AI agents it most often means approval gates: the agent pauses before risky actions such as deploys, deletes or payments, and a named person decides whether it goes ahead.
What does human in the loop actually mean?
It means the AI cannot finish on its own at certain points. A person must review and approve, edit or reject the output before it counts. That is different from human on the loop, where the AI acts by itself and a person monitors and can step in, and from out of the loop, where nobody reviews individual actions.
Is human in the loop agentic AI?
No. Agentic AI describes software that plans and acts with tools. Human in the loop is a control you add to it, such as an approval before a deploy. Most production agents combine the two: they act freely on low-risk steps and pause for a person on high-risk ones. The MCP specification says there should always be a human able to deny tool calls.
How can humans stay in the loop on AI?
Decide which actions need approval, set those gates in the tool's config, send every request to a queue the approver checks daily, and record each decision with its reason and approver. Then review the log every two weeks: how many approvals, how many rejections, and how long requests waited. Remove gates that never catch anything and add one after every incident.
What is an example of human in the loop?
A coding agent prepares a database migration, then stops and asks the data owner to approve it before it runs. Other common examples: a radiologist confirming an AI-flagged scan, a moderator reviewing posts an AI marked as borderline, and a fraud analyst approving a large transfer the model held back.
Is RLHF human in the loop?
Yes, at training time. In reinforcement learning from human feedback, people rank model answers and the model learns from those preferences. Runtime human in the loop is different: a person approves or rejects actions while the system is in use. Agents need the runtime kind, because training does not stop an agent from running a bad command today.
Does Claude Code have human in the loop?
Yes. Claude Code's default mode, labeled Manual, asks before the first use of each tool, and you can add ask rules for specific commands such as git push. Explicit ask rules still prompt in bypassPermissions mode. The auto mode replaces routine prompts with a background classifier, so it puts a model, not a person, in the loop.
From our own experience
We started by gating too much and approving on reflex. What worked was a short list of in-the-loop actions, a written record for each one, and a single queue for anything an agent was waiting on. The surprise was how often the agent was ready and the person was not, so now we measure the wait as closely as we measure the agent.
Let your agents keep the board.
Claude Code, Codex and Cursor open their own tickets, log hours and tokens, and close them with the commit.
Connect your agent