Act 07 · The agent turn 2:30 Self-checks, stuck loops — then build one

How an agent checks its own work.

A reliable agent verifies each step instead of assuming it worked — using objective tool-based checks (run tests, compile, validate) where possible, and fallible self-critique only where no test exists.

Video rendering soonThe cinematic render for this episode is being generated. The article, transcript and key ideas are all here now.

Key ideas

  • The one idea — A reliable agent verifies each step instead of assuming it worked — using objective tool-based checks (run tests, compile, validate) where possible, and fallible self-critique only where no test exists.
  • How it is shown — After writing code, the agent runs the tests (objective, the world answers) versus merely asking itself "looks good?" (self-critique, fallible) — and prefers the test.
  • The trap to avoid — Treating self-critique as infallible — a model can confidently miss its own mistakes; prefer objective checks whenever a real test exists.
  • What it sets up — What if the check keeps failing and the agent retries the same fix forever?

Asking an AI to double-check itself sounds smart. But a model can confidently miss its own mistake. Reliable agents run the tests — objective checks beat self-critique.

The one idea

A reliable agent verifies each step instead of assuming it worked — using objective tool-based checks (run tests, compile, validate) where possible, and fallible self-critique only where no test exists.

Your agent just finished a step — wrote code, ran a search, edited a file. But did it actually work? A weak agent assumes yes and barrels on. A strong one stops and checks. Self-verification separates a reliable agent from one that builds on broken steps. The idea is simple: after an action, the agent looks at the result and asks, did that achieve the subgoal? That's just another turn in the loop — the observation feeds a was-this-right step, whose answer decides whether to move on or retry. There are two ways to check. The first is tool-based and objective: run the code against tests, compile it, validate the output against a schema.

How it works — the demo

After writing code, the agent runs the tests (objective, the world answers) versus merely asking itself "looks good?" (self-critique, fallible) — and prefers the test.

The world answers, not the model. If the tests pass, the step really worked. It's the most reliable check. The second is self-critique: the model reviews its own work and judges it — a critic pass, the model as its own judge. Flexible, no tools needed, but fallible: the same model that made the error may not catch it. So prefer objective checks whenever you can. Running tests beats asking the model if it's happy. Reserve self-critique for what you can't test — is this essay clear, is this plan sound — and treat its verdict as a hint, not proof. The trap: treating self-critique as infallible.

The trap to avoid

Treating self-critique as infallible — a model can confidently miss its own mistakes; prefer objective checks whenever a real test exists.

Why it matters — and what’s next

What if the check keeps failing and the agent retries the same fix forever?

A model can confidently miss its own mistakes; grading your own homework is weak. Whenever a real test exists, run it. Objective verification catches what self-review waves through. So a good agent checks its work: run the tests, re-read the result, critique the draft, then move on or retry. But checking creates a new danger. What if the check keeps failing, and the agent retries the same fix forever? Next: agents get stuck in loops.

This is one short episode in AI: Zero → Frontier, a step-by-step climb through how AI actually works. Each episode builds only on the ones before it.

Full transcript 2:30 of narration

Your agent just finished a step — wrote code, ran a search, edited a file. But did it actually work? A weak agent assumes yes and barrels on. A strong one stops and checks. Self-verification separates a reliable agent from one that builds on broken steps.

The idea is simple: after an action, the agent looks at the result and asks, did that achieve the subgoal? That's just another turn in the loop — the observation feeds a was-this-right step, whose answer decides whether to move on or retry.

There are two ways to check. The first is tool-based and objective: run the code against tests, compile it, validate the output against a schema. The world answers, not the model. If the tests pass, the step really worked. It's the most reliable check.

The second is self-critique: the model reviews its own work and judges it — a critic pass, the model as its own judge. Flexible, no tools needed, but fallible: the same model that made the error may not catch it.

So prefer objective checks whenever you can. Running tests beats asking the model if it's happy. Reserve self-critique for what you can't test — is this essay clear, is this plan sound — and treat its verdict as a hint, not proof.

The trap: treating self-critique as infallible. A model can confidently miss its own mistakes; grading your own homework is weak. Whenever a real test exists, run it. Objective verification catches what self-review waves through.

So a good agent checks its work: run the tests, re-read the result, critique the draft, then move on or retry. But checking creates a new danger. What if the check keeps failing, and the agent retries the same fix forever? Next: agents get stuck in loops.

AgentsSelf-VerificationReliability