Source: https://www.orchestro.org/blog/self-verification-quality-gates-coding-agents
Updated: 2026-11-28

GUIDE · SELF-VERIFICATION

# Self-verification before the green light: the second pass that rechecks agent work

By Daniele Pelleri, building Orchestro at Aetha · Published 2026-11-28

**Short answer:** A finished draft is not a finished job. Let the agent recheck its own work against quality gates, then let a separate check decide whether the exact revision ships.

## The second pass, in one picture

A coding agent such as [Claude Code](https://code.claude.com/docs/en/overview) or [Codex](https://github.com/openai/codex) finishes a change and reports success. Before anyone calls it done, the same agent runs a second pass over its own revision: it rereads the change, runs the checks that prove the outcome, and fixes what it finds. That second pass is self-verification. It catches the agent's own mistakes early, and it is still not the verdict: afterwards a separate check runs on that exact revision and decides whether it ships.

## What a quality gate is

A quality gate is a check named before the work starts, with a pass condition that can be read from the revision under test. For coding-agent work the useful gates are the ones that prove the outcome, not the activity:

*   **A clean install from the exact revision.** Not the working directory with its leftovers: the lockfile and the packages as the next session would find them.
*   **The checks that cover the outcome.** The tests and requests that would fail if the reported problem were still present, run on the exact revision.
*   **A request to the released outcome where one exists.** A successful deploy is not proof the problem is gone; the endpoint or behavior the user sees is.
*   **History kept with the work.** Which revision was checked, what failed and why, so the next attempt starts from the failure instead of repeating it.

## Why the agent should recheck itself first

Self-verification is cheap and it is where the obvious failures die. The agent that wrote the change is the one that knows what it touched, so a disciplined second pass over its own diff, with the gates above, removes the mistakes no one else should have to review. Our guide on [agents that say “done” while tests fail](https://www.orchestro.org/blog/ai-coding-agent-says-done-but-tests-fail) shows what happens when this pass is skipped: the report goes out, a clean install fails, and the lockfile gap is discovered by someone else.

## Why a separate check still decides

A self-check shares the session that did the work: the same context, the same commands it chose to run, the same belief about what “fixed” means. That is why the worker's report opens a check instead of closing the work. The separate check runs the gates again on the exact revision, from a clean state, outside the session that produced it. Evidence belongs to the revision it was collected on: a fresh revision earns a fresh check, and the task stays open until the released outcome passes, not just the deploy.

## A checklist you can apply today

*   Name the gates before the work starts, not after the report arrives.
*   Let the agent run them on its own revision and fix what it finds first.
*   Run them again from outside that session, on the exact revision, from a clean state.
*   Store failed checks with the task so the next session starts from them.
*   Keep release and outcome separate: close the task only when the released outcome passes.

## How Orchestro handles it

Orchestro coordinates your existing coding agents around a project goal. A worker's report triggers an independent check; it does not close the work. Failed checks, rejected revisions and the next action stay in the project history across sessions, and delivery, technical verification and measured impact are kept as separate facts. See [how Orchestro works](https://www.orchestro.org/how-it-works) for the full loop, the [verified repair example in the docs](https://www.orchestro.org/docs/how-it-works), and the checks behind [supported agents](https://www.orchestro.org/docs/agents), or try the [64-second simulation](https://www.orchestro.org/live/demo), no signup needed.

[Apply for an assisted pilot](https://www.orchestro.org/early-access)

[All articles](https://www.orchestro.org/blog)
