GLOSSARY

Human in the loop

Human in the loop means a person approves or reviews an AI agent's actions before they take effect. Definition, a coding agent example and tips.

Short answer

Human in the loop (HITL) means a person reviews or approves an AI system's actions at key points before they take effect. For coding agents like Claude Code and Codex, the loop is mostly permission prompts before commands and edits, plus code review before merging. OWASP lists requiring human approval for high-risk actions as a mitigation for prompt injection.

Human in the loop (HITL) is a design where a person reviews or approves an automated system's decisions at defined points, instead of letting it act fully on its own. For coding agents, it means a developer decides whether the agent may run a given command, edit a given file, or ship a given change.

The opposite is a fully autonomous run, where the agent acts without stopping, such as Claude Code in bypassPermissions mode or Codex with full access.

Where is the human in a coding agent's loop?

There are three common checkpoints:

  1. Before actions: permission prompts ask before shell commands, file edits or network requests.
  2. Before plans run: Claude Code's plan mode explores and proposes an approach for you to approve before editing source files.
  3. Before merging: you review the diff or pull request.

Each checkpoint can be widened or narrowed. Allow rules remove routine prompts, sandboxes contain what runs without a prompt, and ask rules force a prompt for sensitive commands even in permissive modes.

Example

Claude Code is fixing a failing build. It runs tests and edits files freely because you allowed those, but when it wants to run git push origin main, an ask rule stops it:

{
  "permissions": {
    "allow": ["Bash(npm run test *)", "Edit(src/**)"],
    "ask": ["Bash(git push *)"]
  }
}

You read the command, see it targets main instead of a feature branch, and deny it. That single decision is the human in the loop.

Why it matters

Coding agents read untrusted text: dependencies, issues, web pages, tool output. OWASP's entry on prompt injection lists "require human approval for high-risk actions" among its mitigations, because a person can notice an action that does not fit the task. Humans also catch ordinary mistakes that no rule anticipates.

The cost is latency. A prompt you do not see blocks the agent, and too many prompts lead to approval fatigue or to skipping permissions altogether. The practical goal is fewer, better prompts that are quick to answer. Allowbar, a Mac menu bar app, is built for that: it shows Claude Code and Codex prompts with the exact command and lets you allow or block with a click, but it never approves on its own.

Sources

Frequently asked questions

Is auto mode in Claude Code human in the loop?

Partly. In auto mode a classifier reviews actions instead of you, so routine prompts disappear. The Claude Code docs say it does not guarantee safety and is not a replacement for review on sensitive operations; explicit ask rules still prompt you.

Does human in the loop slow coding agents down?

It adds waiting time when prompts go unnoticed. Allow rules for routine commands and a fast way to see and answer prompts keep that cost low.

What is approval fatigue?

Approval fatigue is when so many prompts appear that people approve without reading. It defeats the purpose of the loop, so reduce routine prompts with rules and keep the remaining ones meaningful.

ALLOWBAR FOR MAC

Answer your agents from the menu bar.

Permission requests from Claude Code and Codex slide down from the top of your screen. Allow, Block or send back to the terminal. Allowbar never approves anything on its own.

Launch price $9.99 instead of $29.90, one-time purchase, lifetime license.