# Human in the loop

> Human in the Loop: What It Means and Where You Need It. Canonical page: <https://zapple.tech/glossary/human-in-the-loop/>

Human in the loop means a person approves, corrects or labels at set points of an automated AI process, and the process waits for them. In testing, it decides where a reviewer sits when AI writes, repairs or judges tests. Put the person where a wrong result costs the most, and measure whether they are really reading.

## What does human in the loop mean?

Human in the loop, or HITL, means an automated AI process stops at set points and waits for a person to approve, correct or label something. The term is wider than testing: it also covers people who label training data or sign off an agent's action. This page covers the testing use: where a reviewer sits when AI writes, repairs or judges tests.

Agent frameworks build the pause in. The [OpenAI Agents SDK documentation](https://openai.github.io/openai-agents-js/guides/human-in-the-loop/) says: "When a tool call requires approval, the SDK pauses the run, returns interruptions, and lets you resume later from the same RunState." The [LangGraph documentation](https://docs.langchain.com/oss/python/langgraph/interrupts) says: "Interrupts allow you to pause graph execution at specific points and wait for external input before continuing." It lists approval workflows as a use: pause before critical actions such as API calls, database changes and financial transactions.

The law uses a related word, oversight. Article 14 of the [EU AI Act](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:02024R1689-20260727) says high-risk AI systems must be built so that they "can be effectively overseen by natural persons during the period in which they are in use". Whether your system is high-risk is a legal question, not a testing one.

## Which AI steps in testing need a person's approval, and which can run unattended?

Our rule of thumb: decide by the cost of a wrong pass. A wrong pass is a test that goes green while the product is broken. Nobody may see it until a customer does. Where that cost is high, a person approves before the result counts.

[Claude Code's permission documentation](https://code.claude.com/docs/en/permissions) shows a tiered version of this. In its Manual mode, reading files in the working directory needs no approval. Running shell commands and modifying files ask first, with listed exceptions. Our reading is that the tiers follow what an action can change.

The table below is our reading of where review points sit when AI helps with testing. It is not a sourced standard.

| Review point | What the AI proposes | What the person checks | What goes wrong if the check is skipped |
|:--|:--|:--|:--|
| Test generation | Test cases or test code from a requirement or from exploring the app | That the assertion states the business rule | A test that confirms what the app does, not what it should do |
| Test repair | A new locator or changed step after the interface moves | That the repaired test still has its original intent | A failing check is made to pass |
| Failure triage | A label: product defect, test fault or environment fault | A sample of labels against the logs | Real defects are filed as flaky tests |
| Pass or fail judgment | A grade from a model on another model's output | A sample of grades against labels from people | A wrong grade becomes the release signal |
| Release decision | A summary or a go recommendation | The evidence behind the summary | Nobody owns the decision |

Playwright's [test agents](https://playwright.dev/docs/test-agents) show the first two rows in a real tool. Its planner agent "explores your app and produces a test plan", a generator turns the plan into test files, and the healer "automatically repairs failing tests". Each of those hands work to the next, and each handover is a point where a person can look.

To start with a pilot, [AI QA adoption](/services/ai-qa-adoption/) is the service that runs a measured pilot on a real suite, where an engineer reviews every AI output and it is logged as accepted, changed or rejected.

## How do you keep human review from becoming a rubber stamp?

The EU AI Act names the risk in long review queues. Its oversight article says a high-risk system must be provided so that the people assigned to oversight are enabled "to remain aware of the possible tendency of automatically relying or over-relying on the output produced by a high-risk AI system (automation bias)". The same article says they must be enabled to decide not to use the system or to "disregard, override or reverse" its output.

Three habits that follow, from our practice and not from a source:

1. **Review a sample, set in advance.** Pick the share of items and the riskiest categories before the run, not after.
2. **Track time per item.** If approvals take seconds, nobody is reading. Slow the queue or shrink it.
3. **Count what reviewers overturn.** A reviewer who never rejects anything tells you little. Slip in a known bad item now and then and see whether it is caught.

The same habits apply to people reviewing code that an AI wrote. Our [AI code review checklist](/blog/types-of-automation-testing/ai-code-review-checklist/) lists what a reviewer should still check before a merge.

## How does it differ from autonomous testing and from a judge model?

Autonomous testing is the other end of the scale, where the process decides and acts without waiting for approval. Our [autonomous testing](/glossary/autonomous-testing/) page sets out its levels. When one model grades another, you have put a judge in the process, and a person still has to check the judge; the [LLM-as-a-judge](/glossary/llm-as-a-judge/) page covers how. A [quality gate](/glossary/quality-gate/) is where an approval rule is written down so that it is applied the same way each time.

## When can you remove the human from the loop?

Our rule of thumb: when a wrong result at that step is cheap, another check would catch it, and reviewers have overturned close to nothing over a sample you chose. Then move from approving each item to watching a sample: human on the loop. The definition here is ours, not a formal standard.

Move back if the model, the prompt or the product changes. Review needs a fresh sample after each of those. Two of our posts go further: one asks [whether AI will replace software testers](/blog/qa-engineers/will-ai-replace-software-testers/), the other covers [how to test AI agents](/blog/types-of-automation-testing/how-to-test-ai-agents/).

## What does human in the loop not solve?

Review adds a person, not a correct expected result: someone still has to own what "passed" means, and write it down. It also does not scale with the volume AI can produce, so the queue itself needs a limit. Treat a person in the loop as one control with a cost, never as proof that the output is right.

## What does Zapple.Tech do about it?

To decide where a person should sit in your AI-assisted testing, start with the evidence. Zapple.Tech starts with a one-week QA audit of one product area. It looks at its tests, pipeline and release process, and ends in a written report on what is at risk and what to fix first, plus a pilot plan you can run with Zapple.Tech or without it. Read more on the [QA audit and assessment](/services/audit-and-assessment/) page.

Tell us how your team uses AI in testing in the form below.

## FAQ

### What does human in the loop mean?

Human in the loop means a person is built into an automated AI process at defined points. The process pauses, the person approves, corrects or labels, and the process continues. Agent frameworks document this as a pause that returns control to a person before an action runs.

### What is human in the loop in AI testing?

It is a reviewer placed at the steps where AI writes tests, repairs them, sorts failures or judges output. The person checks the assertion, the repair or the grade before it counts. The aim is to keep a person responsible for what passed means.

### What is the difference between human in the loop and human on the loop?

In the loop, a person approves each step before it takes effect. On the loop, the process runs and a person watches, with the power to stop it. Pick by the cost of a wrong result at that step. The definitions here are ours, not a formal standard.

### Does the EU AI Act require human oversight?

Article 14 of the EU AI Act requires high-risk AI systems to be designed so that natural persons can effectively oversee them while in use. Whether a given system is high-risk is a legal question, so ask your counsel.

### When can you remove the human from the loop?

Our rule of thumb: when a wrong result at that step is cheap, another check would catch it, and reviewers have overturned close to nothing over a sample you chose. Keep a spot check even then, because the AI and your product both change.

## Sources

- [EUR-Lex, Regulation (EU) 2024/1689 (AI Act), Article 14 Human oversight, consolidated version of 2026-07-27 (as amended by Regulation (EU) 2026/1744)](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:02024R1689-20260727)
- [OpenAI Agents SDK documentation, Human-in-the-loop (current docs)](https://openai.github.io/openai-agents-js/guides/human-in-the-loop/)
- [LangChain documentation, LangGraph Interrupts (current docs)](https://docs.langchain.com/oss/python/langgraph/interrupts)
- [Playwright documentation, Test agents (current docs)](https://playwright.dev/docs/test-agents)
- [Claude Code documentation, Permissions (current docs)](https://code.claude.com/docs/en/permissions)
