cal · writing

Coding agents need a judgment layer

Jul 2, 2026 · 5m read

The models got good enough to run for a long time without you. That's the whole shift. A year ago you watched every step; now you hand an agent a task, walk away, and it works for twenty minutes, an hour, a full overnight run. The capability arrived. The supervision didn't.

So here's the gap I keep bumping into: an autonomous agent has no idea when it's failing. It'll re-read the same file forty times, "fix" a test by deleting the assertion, spend real money circling a problem it can't solve, and report back cheerfully that it's making progress. It's not lying. It genuinely can't tell. The thing that would notice — a supervisor stepping back to ask is this working? — isn't the agent. It's a different job.

I think that job is a judgment layer: a thin, model-light thing that sits beside a run, reads what's actually happening, and makes one of three calls — continue, pause, or kill. Not smarter reasoning inside the agent. Cheaper judgment outside it.

Why it's a separate layer

The temptation is to make the agent supervise itself. Add a reflection step, ask it to grade its own progress, tell it to stop when it's stuck. This mostly doesn't work, for the same reason you can't reliably proofread your own writing: the process that produced the work is the wrong process to evaluate it. An agent mid-task is motivated to see progress. It set the bar; of course it thinks it cleared it.

Judgment wants the opposite stance — fresh eyes, no attachment, actively trying to find the failure. That's structurally a second party. It can be a cheaper model, even a pile of plain rules, precisely because its job is narrow: not "solve the task" but "is this run healthy, and if not, what do we do about it?"

And it wants signal the agent doesn't privilege. Wall-clock since the last real action. The same tool call three times in a row. Spend against a ceiling. A command that pattern-matches to something destructive. None of that requires understanding the task — it requires watching the run.

Two shapes of the same idea

I've built this twice now, from opposite ends.

smartloop is the judgment in the loop. It reads the transcript after each turn and decides — done, keep going, or this is getting risky — driving an autonomy dial from cautious to bold, with a hard floor that won't auto-approve genuinely dangerous actions no matter how confident the run looks. The judgment is the point; the loop just executes what it decides.

agentop is the judgment as an instrument. It's a top-style dashboard over your agent sessions — spend, tool calls, and detectors for stalls, thrash, risky actions, and budget breaches — that can pause a session through an opt-in hook or kill its process. Same three calls (continue, pause, kill), but human-in-the-loop by default: it surfaces the judgment and hands you the lever.

One automates the decision; one instruments it. Both are betting that the decision itself — not a better model — is what's missing.

The design constraints that fall out

Once you accept the layer is separate and always-watching, a few things stop being optional.

It has to fail open. A supervisor that can crash the thing it supervises is a liability, not a safeguard. agentop's enforcement hook allows the action on any internal error. The judgment layer earning the right to say "stop" depends entirely on never saying it by accident.

It has to be honest about what it doesn't know. A judgment layer that fabricates a confidence it doesn't have is worse than none — you'll trust it and get burned. agentop renders ~? for a cost it can't compute and counts the transcript lines it couldn't parse, rather than papering over either. If the layer's whole value is judgment, a single confident-but-wrong call spends its credibility.

It has to be cheap enough to always be on. Supervision you only run sometimes isn't supervision. That's the argument for rules and small models doing the watching, and saving the expensive reasoning for the moments the cheap layer flags.

Where this goes

Right now these are my tools, watching my runs. But the shape generalizes past one person's setup. As teams point fleets of agents at real work, "is this run healthy, and who decides when it isn't?" stops being a personal-workflow question and becomes an operational one — the same way we grew monitoring, circuit breakers, and kill switches around every other system we let run unattended.

The models will keep getting better at the task. I don't think that closes the gap. A more capable agent runs longer and spends more before it notices it's off the rails — which makes the layer that does notice more valuable, not less. The judgment layer isn't a stopgap until the models can supervise themselves. It's the part that was always going to be someone else's job.

← all writing