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 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 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 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 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 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 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:
- Review a sample, set in advance. Pick the share of items and the riskiest categories before the run, not after.
- Track time per item. If approvals take seconds, nobody is reading. Slow the queue or shrink it.
- 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 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 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 page covers how. A 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, the other covers 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 page.
Tell us how your team uses AI in testing in the form below.
How does human in the loop relate to other terms?
- Autonomous testing
Autonomous testing means software, not a person, decides what to test, writes the checks and runs them. Tools cover parts of that loop today: Playwright's documented test agents explore an app, draft tests and repair failing ones. You still own the expected result, the test data and the release decision.
- LLM as a judge
LLM as a judge means using one language model to grade the output of another against a rubric, so a team can score thousands of answers unread by people. It is fast and flexible, but the judge makes its own errors. Trust its score only after you compare it with human labels, and check hard rules without a model.
- Quality gate
Quality gates are conditions a code change must meet before it moves to the next stage, such as a merge or a release. Passing tests, no new serious findings and an approving review are typical. A gate turns "ready" from an opinion into a rule your pipeline can enforce, and an agreed override stops your team switching it off.
- AI in QA
AI in QA means using AI tools for testing work, such as drafting tests and repairing them, with engineers reviewing the output. The adoption service gives a QA team a ranked list of where AI fits its testing, a pilot on a real suite, written rules for AI output and training.
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) (read 5 December 2026)
- OpenAI Agents SDK documentation, Human-in-the-loop (current docs) (read 5 December 2026)
- LangChain documentation, LangGraph Interrupts (current docs) (read 5 December 2026)
- Playwright documentation, Test agents (current docs) (read 5 December 2026)
- Claude Code documentation, Permissions (current docs) (read 5 December 2026)