The Verification Checkpoint Pattern for AI-assisted coding
Posted: (EET/GMT+2)
When using AI agents for coding, do not treat AI's declaration of "done" the final answer. Instead, add a verification checkpoint before accepting the result.
I recently hit this while working on concurrent C# code with an AI agent fleet. The agents reported that a bug was handled and that valid tests existed. In a casual application, that might be fine, but this one was different: higher stakes, more complex logic, and less room for error.
Given this setting, something felt off, so I asked for a verification pass.
The result was useful: the tests covered only part of the behavior. The coverage was closer to 20% than "done". After asking for the missing cases, the coverage was expanded to cover the actual concurrency scenario.
The pattern is simple:
- ask the AI agent to implement the change
- ask what evidence proves the change works
- ask it to run or inspect that evidence
- ask for gaps, missing cases, and weak assumptions
- only then accept the result.
The important part is asking for evidence, not reassurance.
For example, you might give instructions as follows:
"Before we accept this change, verify it. Show: - what tests cover the bug - what cases are not covered - what commands were run - what evidence proves the fix works."
And for test coverage:
"Do not summarize. Inspect the test coverage and list the missing cases."
This works because AI agents can be confident while still optimizing for the wrong thing. For example, the expressions "tests are passing" may only mean that the existing tests pass. It does not mean the bug is covered.
Similarly, the AI response "enough coverage exists" may hide important details:
- only the happy path is tested
- the failing concurrency case is not tested
- the tests do not assert the important behavior
- the test suite passes because it avoids the bug.
Tip: separate implementation from verification. The agent can write the code, but the acceptance step should be evidence-based.
This is especially important for concurrent code, security-related changes, data migrations, billing logic, and anything where "mostly correct" is not enough.
A good verification checkpoint does not need to be complicated. It just needs to force the work to produce something inspectable:
- test names
- test output
- coverage report
- commands run
- before and after behavior.
Another tip: if the agent says the work is complete, ask what would prove it wrong. That question usually finds better gaps than asking whether everything is fine.
AI agents are useful workers, but they are not reliable auditors of their own work unless the audit produces concrete evidence. Remember A/B testing, too.
For the lack of a well-known name for this, I'm calling this process a pattern: "Verification Checkpoint Pattern" or just VCP.