AI Tools16 May 2026

Why your AI agent doesn't stop until it's done

Why your AI agent doesn't stop until it's done

The moment you stopped paying attention

You give an AI agent a task.

It works.

You make a coffee, answer a message, look out the window for a moment.

And when you come back: done.

Not "sort of started". Done.

That's no accident. That's architecture.

And anyone who understands it will use AI tools differently from now on.

What really happens when Claude Code works

Most people think an AI agent runs through once and delivers a result.

That's not how it works.

Claude Code works in loops.

After every pass, the system asks an internal question: has the goal been reached?

If not: again.

The evaluator is not the same model that writes the code. Claude Haiku, a much lighter model, takes on the role of the evaluator. It reads the output, compares it with the defined completion condition and decides: continue or stop.

Heavy model for execution. Light model for evaluation.

That's a smart architecture decision, not a way to save money.

The real tool: Definition of Done

The Goal feature in Claude Code has been around for a while. Most people don't use it.

Instead they type a task into a prompt field, wait, look at the result and correct it by hand.

The difference between this routine and a real agentic workflow is one single question:

When does the task count as finished?

Not "what should happen", but "how do you know it worked".

That's a different way of thinking.

Anyone who defines a success criterion gives the system an anchor. The agent doesn't run into empty space, it runs toward a goal. And if it misses the goal, it starts over without you having to step in.

Nobody needs you for the next prompt.

Why this matters in practice, beyond theory

I'm building several systems at the same time right now. Mamko on one side, CUVIR projects on the other. Plus smaller tools I set up for consulting engagements.

The resource that's scarcest in all of this isn't capital. Not time in the classic sense.

It's attention.

Every manual loop I run myself costs attention I no longer have for decisions that really need my judgment.

The Claude Code self-correction loop gives me that attention back.

I describe once when a task is done. The system works until that condition is met. I see the result.

Done.

A pattern you can translate into your own systems

If you build your own agents or put workflows together, this principle is worth adopting as an architecture idea:

Separate execution and evaluation.

The model doing the work isn't the best judge of its own work. Not because it's bad, but because evaluation is a different task from execution. A dedicated evaluator model, even if it's smaller, judges more cleanly because it has no stake in its own output.

The question "Have I reached the goal?" is structurally different from "What's the next step?"

Anyone who separates the two builds more stable systems.

The concrete steps if you want to test it today

Take a task you'd normally let Claude Code run once.

Don't stop at phrasing the task.

Phrase the success criterion.

Not: "Write a function that does X."

Instead: "The task is complete when the function does X, covers all edge cases from the original prompt and the tests run without errors."

That's the difference.

Start the loop. Let it run. Watch how many iterations the system needs to meet your Definition of Done.

Then decide whether you want to make the criteria stricter or looser.

After the first run, you'll develop a feel for how precise you need to be.

What this says about where things stand

Both big coding agents, Claude Code and Codex, have introduced the Goal feature.

That's no accident.

The trend is moving away from "run once, user corrects" toward "iterative self-correction up to the defined quality".

Anyone who sees this as a mere technical detail misses the point.

The point is: AI agents are becoming more and more independent, in the sense that they no longer rely on you checking after every step whether everything is right.

That changes how you delegate tasks.

No longer: "Do this." With a result check every five minutes.

Instead: "Do this. Here's when you're done. I'll check back in when you tell me."

That's a different relationship with the tool.

And anyone who sets up this relationship now will have a considerable lead in twelve months over those who still follow up on every prompt by hand.

FAQ

What is a self-correction loop in AI agents?

A self-correction loop is a process in which an AI agent checks its own output against a defined goal after every pass. If the result doesn't meet the goal, the agent automatically starts a new pass without anyone having to step in. This keeps going until the completion condition set beforehand is reached.

Why does Claude Code use a different model for evaluation than for execution?

Because evaluation is a different task from execution. In Claude Code, Claude Haiku takes on the role of the evaluator and checks the output of the heavier execution model against the completion condition. That way a model with no stake in its own output judges the progress, and that leads to cleaner decisions.

What does Definition of Done mean for AI agents in concrete terms?

Definition of Done is the clear description of how an agent recognizes that a task is complete. Instead of only describing what should happen, you set which conditions must be met, for example that all edge cases are covered and tests run without errors. This definition is the anchor the self-correction loop steers by.

Which coding agents currently support a goal-based loop like this?

According to the article, both Claude Code and Codex have introduced a Goal feature that allows iterative self-correction up to the defined quality. So both big coding agents are betting on the same trend, away from running once with manual correction by the user. The concrete technical implementation, such as which model evaluates internally, differs from provider to provider.

Do I have to phrase a success criterion for every task for the loop to work?

Yes, without a defined success criterion the agent has no anchor and doesn't know when to stop. The wording should be concrete, meaning it names how completion can be recognized, beyond what the solution should do. The more precise the criterion, the more focused the loop runs, and a feel for the right precision usually only develops after the first run.

← All insights