AI Agent Output Verification: How to Review Unattended Coding Results Without Reading Every Line

You set up an unattended coding run before bed. The agent ran through the night. You wake up to a commit, a diff, and a summary that says "done."

Now what?

This is the handoff review problem, and it is the single most overlooked issue in AI-assisted coding. Everyone talks about how to prompt the agent better. Almost nobody talks about how to verify its output efficiently enough that your morning review is faster than doing the work yourself.

The verification bottleneck

The promise of AI coding agents is that they save time. The reality is often the opposite: the agent writes code quickly, and then you spend just as long verifying it as you would have spent writing it yourself. If you read every line, you lose the time savings. If you don't read every line, you ship unverified changes.

The solution is not "read everything" or "trust everything." It is structured verification at the workflow level.

Here is what that looks like in practice.

1. The spec check: did it build what was asked for?

Before you read a single line of code, verify the output against the original task specification.

Open the spec and ask three questions:

Did it change only the things that were in scope? Check git diff --stat first. If the agent touched twice as many files as you expected, something went wrong.

Did it address every acceptance criterion? If the spec says "add tests for the empty state" and there are no new test files, the run is incomplete regardless of how clean the diff looks.

Did it respect the non-goals? A common failure mode is the agent "helpfully" refactoring adjacent code that was explicitly marked out of scope.

A good spec makes this check take five minutes. A vague prompt makes it impossible.

2. The scope check: did it stay in its lane?

This is the single most common failure mode for unattended AI coding runs: scope creep.

The agent fixes the bug you asked about, then notices a related function that could be cleaner, then refactors a dependency, then updates a type that touches three other files, and before you know it the diff is 800 lines across twelve files and you cannot tell what was the fix and what was the tidy-up.

Check: git diff --stat should roughly match your expectation. If the spec said "add a loading state to the Dashboard component" and you see changes in utils/, types/, middleware/, and package.json — something drifted.

3. The verification gate: did the actual repo checks pass?

This should be objective. The agent should have run the checks before claiming it was done.

Check the run logs (not the agent's summary — the actual command output):

Did pytest / jest / go test run and pass?

Did the linter run without new errors?

Did the type checker pass?

Did the build succeed?

If the agent's summary says "tests passed" but the run log shows FAILED (errors=2), you know the agent's self-assessment is unreliable for this task. That is useful signal.

Rule: an agent that claims success when tests failed is an agent whose judgment you should not trust for the rest of this run.

4. The diff review: read the shape, not every line

You do not need to read every line of a 500-line diff. You need to read the shape.

Check in this order:

New files first. New files are the least ambiguous. If the agent created a new component, read it fully — there is no git history anchoring it.

Deleted code. Deletions are usually fine (removing dead code, cleaning up) — but verify nothing functional was removed unintentionally.

Heavily modified files. A file with +200 -150 needs more attention than one with +5 -2.

Configuration changes. Changes to pyproject.toml, package.json, .env.example, Dockerfiles, or CI config deserve a close look. Agents sometimes modify dependencies without understanding the implications.

What to actually look for:

Repeated patterns that suggest copy-paste

Exception handling that swallows errors silently (except: pass)

Hardcoded values that should be configurable

Comments that describe the intent vs. code that does not match the comment

5. The trust calibration check

This is the meta-question nobody talks about: how much should you trust this particular agent on this particular kind of task?

Answer by checking the run log for these signals:

Did the agent retry? An agent that retried three times and succeeded on the fourth pass is systematically weaker on this task.

Did it need recovery? If the workflow had to checkpoint-and-resume because the agent stalled or rate-limited, the output is more likely to have gaps.

Did verification pass on the first try? If it did, the agent is well-calibrated. If it took multiple analysis-evaluation loops, the diff may be a patchwork.

Over time, build a mental model: "Claude Code is reliable on Python refactoring but drifts on TypeScript generics," or "Codex is fast on simple tasks but needs tighter scoping." This is not about finding the perfect agent. It is about knowing where to spend your review attention.

6. The commit quality check

The handoff should not be one giant commit.

Good: atomic commits with meaningful messages (Add empty state to Dashboard, Add tests for empty state behavior, Update storybook stories for Dashboard).

Bad: one commit with message "implement changes" containing everything.

Separate, well-scoped commits let you review incrementally and revert cleanly. If the agent produced a single blob commit, it likely treated the task as one undifferentiated unit — which means you should review it that way too.

7. The evidence-based review loop

The most productive pattern I have found looks like this:

Scan the run log (2 minutes) — did verification pass? Did anything unexpected happen?

Check the spec match (3 minutes) — did it do what was asked?

Audit the diff shape (5 minutes) — scope, new files, config changes

Spot-check the code (5–10 minutes) — read the parts that look risky, skip the predictable stuff

Decide (30 seconds) — merge, fix, or loop again

That is 15–20 minutes for a task that might have taken 2–3 hours to write manually. That is the real productivity gain — not "write zero code," but "review at a higher level."

Where workflow automation makes this repeatable

The checks I described above are manual, but they do not have to be. A well-structured workflow can automate steps 1–3:

Spec matching can be checked by a review agent that compares the final diff against the original PROMPT.md.

Scope creep can be flagged by comparing git diff --stat against the expected file list.

Verification already runs in the loop — the question is whether the workflow enforces that pytest passed before allowing the "done" signal.

This is the core idea behind Ralph Workflow: the workflow runs the checks. The human reviews the result. The agent does not self-certify.

Once the workflow is running verification gates and spec checks, your morning review is not "did the agent do anything wrong?" It is "do I agree with the documented evidence?"

That is a much better question to start the day with.

A practical checklist

Here is a checklist you can use for your next unattended coding run. Print it. Use it. Adapt it for your stack.

## AI Agent Output Verification Checklist

### Spec match
- [ ] Diff matches expected scope (`git diff --stat`)
- [ ] All acceptance criteria are addressed
- [ ] Non-goals are respected
- [ ] No unexpected file changes

### Verification
- [ ] Tests passed (check run log, not agent summary)
- [ ] Linter clean
- [ ] Type checker clean
- [ ] Build succeeded

### Diff review
- [ ] New files reviewed fully
- [ ] Deleted code verified
- [ ] Config changes audited
- [ ] No silent error swallowing

### Trust calibration
- [ ] Retry count: ___
- [ ] Verification passed on first try: yes / no
- [ ] Agent + task fit: good / cautious / review everything

### Decision
- [ ] Merge
- [ ] Fix (re-run with tighter spec)

The agent cannot self-certify

The central principle is simple but surprisingly hard to operationalize: the agent that wrote the code cannot be the sole judge of whether the code is good.

This is not a criticism of AI coding agents. It is an observation about how verification works in any engineering context. You would not ask a junior developer to be the only reviewer of their own pull request. You should not ask an AI agent to be the only reviewer of its own unattended output.

The verification layer — whether it is a human reviewer, a workflow automation system, or a combination of both — has to be external to the coding agent. That is the difference between "the agent said it was done" and "I can see, from the evidence, that it is done."

Ralph Workflow is a free and open-source orchestrator that wraps your AI coding agents in a structured, reviewable workflow. It runs planning, development, verification, and handoff as separate phases with explicit gates. The workflow enforces the checks. You review the evidence.

Codeberg (primary) — ⭐ star the repo, watch for releases, fork it.
GitHub (mirror) — also available if that's where you browse.
Docs — setup guide, workflow config, and real-task walkthroughs.

pipx install ralph-workflow

Requires Python 3.12+. Bring your own coding agents. Keep your keys to yourself.