DEV Community

Cover image for Human-in-the-Loop
bob.ts
bob.ts

Posted on

Human-in-the-Loop

The Start

I am a Pragmatic AI Developer. I use agents every day. I also still read every line they hand me.

A co-worker said, "I haven't written any code since I got here." He's been with this organization for 10 months.

That's fine. I'm not keeping score on how many lines he typed. My question is how much code he's read. Ten months of merged PRs is a lot of code with his name on it. If something in there breaks at 2 a.m., will he recognize it?

I advocate for a human-in-the-loop in modern Agentic AI development. Lately I've had to defend the phrase itself.

The Next Phase

Another co-worker coming back from a conference said, "It shouldn't be a 'human-in-the-loop,' but rather a 'human-in-control.'

He told a story to make the point. A child is heading out to a party where there will be drinking and drugs. The parent is "kept in the loop." They get a text. They know where the kid is going. And the kid goes anyway. In that scenario, he argued, the parent needs to be in control, not just informed.

Parent and child talking about a party

I get why that story lands in a conference talk. It still bugged me.

Why It Bugged Me

The story works because it uses the office meaning of "in the loop." That's the person who gets CC'd on the email. They're informed. They can't stop anything.

That isn't the loop I mean.

In engineering, a loop is a feedback loop. Input goes in, something acts on it, the result gets checked, and the check decides what happens next. If you put a human in that loop, the work has to pass through them. Nothing moves forward until they do their part. A thermostat doesn't send the furnace a heads-up. It turns the furnace on or off.

So the parent in that story was never in the loop. They were on the distribution list. A parent who is actually in the loop is the one who has to say yes before the car leaves the driveway.

I also don't love "human-in-control" for agentic work, for a practical reason. Control sounds like I'm steering every keystroke. If I have to dictate every line to the agent, I've just become a very slow typist with extra steps. What I want is to let the agent do the work it's good at while making sure none of that work ships without a person who understands it.

The two phrases might be after the same thing. I'd rather fix the definition than throw out the term.

The Definition

A human-in-the-loop is someone responsible for reading, evaluating, and/or exercising the code. This isn't a notification; it's a link in a chain (the process). If that link doesn't hold, the chain breaks.

The human-in-the-loop can be:

  • A developer reading PRs and examining code. Actually reading it. Pulling the branch when the diff doesn't tell the whole story, and asking why a function exists before approving it.
  • A tech lead examining an AI-generated PR and diving into the code mentioned. Agents are good at writing a confident PR description. The lead's job is to check that the description matches what the code does and to follow references into files not in the diff.
  • A QA engineer building out integration and automated tests that are thorough. Tests that came from someone thinking about how the feature should behave, as opposed to tests the agent wrote to agree with the code it just wrote.

Each of these people can stop the work. That's the whole point.

What It Isn't

A human-in-the-loop isn't a Slack message saying the agent opened a PR.

It isn't an approval clicked from a phone between meetings.

It isn't a reviewer skimming 1,400 changed lines and leaving "LGTM."

All of those put a person near the loop. None of them put the person in it. They're the parent getting the text.

Back to My Co-Worker

I don't think he's doing anything wrong by not typing code. Agentic AI is good, and it keeps getting better. Typing was never the hard part of the job anyway.

But the job didn't disappear. It moved.

Writing turned into reading. Building turned into evaluating. And reading is harder than it sounds because agent-written code tends to look clean whether it's right or not.

A few questions I ask myself before I approve anything an agent wrote:

  1. Could I explain this change to someone else without opening the PR description?
  2. Do I know what happens when the input is empty, null, or wrong?
  3. If this breaks in production, would I know where to start looking?

If the answer to any of those is no, I'm not in the loop yet. I'm just adjacent to it.

Where I Land

Call it human-in-the-loop. Call it human-in-control if that phrase works better for your team.

I care more about what the person does than what we call them.

A human who reads, evaluates, and exercises the code is already in control. A human who only gets notified isn't, no matter what label you give them.

So, to my co-worker who hasn't written any code in 10 months: that's fine. How much have you read?

Top comments (0)