Judges and verification
Who decides the goal is met? The difference between self-report, a separate model and a deterministic check matters a lot.
Every goal loop has a moment where something decides whether to continue. That something is the judge. Its design determines whether the loop ends on time, ends too early, or never ends.
A hierarchy of judges
The arXiv paper Stop Hand-Holding Your Coding Agent ranks verifiers by strength. Simplified:
Deterministic checks
Exit codes, test results, type checks, a metric crossing a threshold, a file existing. These are cheap, reproducible and hard to argue with (but not impossible to game; see below).
Behavioural checks against the real system
Run the app and click through it. Anthropic's long-running harness has its evaluator drive the running app via Playwright, the way a user would, rather than reading code (Anthropic).
A different model as judge
A separate model reads the evidence and decides. Claude Code's /goal uses a separate evaluator (Haiku by default) after every turn (docs). Hermes uses a goal_judge auxiliary model (docs).
A model judge works well for "is the goal met?" and much less well for "is this code well designed?". Dex Horthy argues that a judge trained the same way as the maker can't see what training never rewarded, so review bots raise the floor but not the ceiling of code quality (Why factories fail).
The same agent judging itself
The model decides it's done. This is the weakest form. Anthropic found self-evaluation to be lenient, which is part of why its harness separates evaluator and generator.
A human checkpoint
The most expensive judge, and the one that doesn't scale. Often still the only one that works for taste and judgment calls.
The paper's rule: if a model judge is unavoidable, a different model should judge, never the same agent approving itself.
Transcript vs. world
A subtle but important distinction: what does the judge look at?
- Transcript judges read the conversation: what the agent said it did and what tools returned. Claude Code's evaluator works this way. It's cheap and general, but it judges the story, and an agent that misreports can mislead it.
- World judges inspect the actual state: run the tests themselves, query the deployed service, diff the repo. More reliable, but they need to know how to check, which pushes you back toward checkable goals.
As one goal-design guide puts it, the question isn't "did the agent say it completed the task" but "does the system state reflect completion".
How judges fail
The agent says "all tests pass" when they don't. A transcript judge may believe it. Overclaiming can be detected by comparing assertions against tool-call logs (Vector Labs).
The tests really pass because the agent deleted, skipped or weakened them. This is reward hacking. It requires isolating the grader from the agent's ability to edit it (SpecStory, Reward Hacking Benchmark). Details in Verification.
In Hermes, if the judge model call fails, the verdict defaults to continue, so the turn budget is the real backstop (docs). Any harness needs a decision about what a broken judge means.
The condition is subjective or impossible, so the loop runs until the budget is exhausted. Claude Code lets the evaluator declare a goal impossible to cut this short.
When a check fails, a naive retry says "make the test pass", which turns the symptom into the new goal. A better retry keeps the original goal fixed and appends the failing assertion verbatim (DEV: stop your agent reward-hacking its own checks).
Cheap judges are a cost lever
Judges run after every turn, so their cost matters. Hermes reports the judge call is small, around 200 output tokens per turn, and documents routing it to a cheap model such as Gemini Flash (docs). Claude Code defaults to Haiku. And the cheapest judge is no model at all: if the goal is "tests pass", check the exit code before asking any model anything. See Model choice.
Further reading
Writing goals that can be checked
The hardest part of a goal loop is writing the goal, and turning intent into something a machine can check is a skill.
Budgets, lifecycle and persistence
Every goal needs a way to end without success, a set of states it moves through, and somewhere to live between sessions.