Agent Says 'Verification Done'—Don't Believe It Yet: Someone Found It Deleted Failing Tests
An Agent's 'verification done' cannot be taken directly as a conclusion. Five practical lessons: give acceptance criteria, have the Agent provide screenshot evidence, and humans only focus on key issues. There's also a real case: it deleted failing tests and then reported all green.
Many people have been burned by Agents: it swears it's done and verified, you believe it, ship it, and find out it wasn't done at all. After getting chewed out by your boss, you go back to it, it apologizes nicely, and next time it's the same.
The problem lies in how we ask it to verify. The Agent doesn't know what 'done' means, and you don't have a low-cost way to confirm it's really done. Here are five practical lessons.
- Don't rely on adversarial verification
Adversarial verification means having another Agent, or even multiple Agents, check the result; the executing Agent improves based on feedback, then it's checked again, improved again, until complete.
Sounds good, but in practice it often fails to converge. Especially with less capable models, most of the time it gets worse with each revision and wastes a lot of tokens. The reason is the lack of a unified acceptance criterion. The checking Agent may not have the full context or know the exact acceptance criteria, so it makes up a bunch of suggestions, the executing Agent accepts them all, and the result drifts further off.
That said, adversarial verification isn't worthless. A commenter added: at key task milestones, insist on self-check + peer check and do cross-validation. The cost is more tokens; the benefit is greater accuracy and stability. For simple tasks, self-check alone is enough, but for tasks where abnormal results would cause large losses, cross-checking is recommended.
- Give clear acceptance criteria, then give it an environment where it can verify
Hand a design mockup to an Agent and say, 'Help me turn these mockups into pages,' and it usually gives you something close, sometimes quite far off.
Try saying it differently: 'Help me turn these mockups into pages. When done, take screenshots of the webpages, compare them with the mockups, and require not a single pixel to differ.' Now the Agent won't easily call it done. It will take screenshots, write tools to compare pixel differences between the screenshots and the mockups, rework it, and repeat until not a single pixel really differs.
Most of the time you don't need zero pixel difference; some deviation is acceptable. The point is to let it know what the acceptance criteria are and to give it a way to verify by itself.
- The earlier you verify, the lower the rework cost
Verifying early is common sense in traditional software engineering, bought with blood and tears. It's just that now Vibe Coding (using natural language to make AI write code) has drastically lowered the cost of generating code, more non-professionals are involved, and people are gradually forgetting that before writing code there are still three gates:
Feasibility analysis: Is this project really worth doing? Will anyone use it once built? Is the ROI worthwhile?
Prototype development: First build the basic interactions and create a runnable prototype at low cost with mock data, to quickly validate whether the direction is right; if not, adjust immediately. Agents are already very good at making prototypes, such as Claude Design or the local version open-artifact. What they produce looks little different from the final result, at much lower cost and faster speed.
System design: technology selection, module division, data structures, database design, API Schema, etc. If the design isn't done well, the system can still run, but future maintenance costs will be much higher. Although Agents are capable, the technical solutions they choose are not always the best. Before starting implementation, have it write a technical design document first. Take a quick look: on one hand it helps you understand how the project is implemented; on the other hand you can correct potential issues in time and avoid rework after it's done.
- Have the Agent provide evidence to lower your acceptance cost
Humans in the Loop are essential. If you hand everything to AI, you'll most likely just get AI Slop (garbage content generated by AI). But human acceptance capacity is the bottleneck; having too many things to confirm is exhausting. A commenter recently used Antigravity and had to manually confirm every file read across Workspaces—nearly breaking down.
So minimize the human confirmation cost: be able to quickly judge whether the result is right and quickly point out where the problem is. The simplest way is to have the Agent provide screenshots, screen recordings, or a visualized HTML report. The Agent can also discover some issues itself while taking screenshots, but the greatest value of screenshots is that a human can see the problem at a glance.
Imagine you're the boss and an employee comes to report on work: a densely packed one-page Word document or a beautiful three-page PPT—which is easier to look at?
Common practices:
- When developing a new feature, have it provide screenshots of the new feature.
- When fixing a bug, have it provide before-and-after screenshot comparisons.
- Have it simulate API response data itself and dynamically generate screenshots for various scenarios, with no need for server-side coordination at all.
- Focus code review on the real issues
Agents generate code so fast that the bottleneck has shifted to code review and verification. Code review is unlikely to be done entirely by humans anymore, but human participation is still meaningful—just in a different way:
- Keep PRs as small as possible, so the Agent reviews them more accurately and humans can keep up.
- Let the Agent review, but don't fully trust its conclusions. Review results should be graded, and humans should only focus on P0 and P1 issues (the most severe ones), especially security and performance issues. Have a human screen them, and when necessary, ask the Agent to explain and verify locally.
- Let the minor details slide. Issues like code style and best practices don't need much attention.
A developer added a more specific practice: OpenAI's Codex practice writes architectural constraints into check scripts. The most convincing evidence for fixing a bug is that the same regression test fails on the old commit and passes on the new commit. Acceptance cases should be locked first and rerun by an independent CI; changing assertions or skipping cases must be reviewed separately. Otherwise, if two Agents both say it passes, that's just two opinions.
A commenter also shared a rather sneaky case. Jeongho Nam, author of the TypeScript library typia, had an Agent migrate the library from TypeScript to Go in May this year. In the morning, CI was all green, and the Agent reported that all tests passed. Only after opening the diff did he discover that failing test cases had been deleted, and the tests directory was 70% smaller. Its final line, 'all tests pass,' was technically not wrong; it just didn't mention that it had touched the tests. So screenshots and test output are both useful, but it's best to also check which files it changed.
In the end, these five points are all about the same thing: when an Agent says 'done,' you can't take it directly as a conclusion; you have to turn it into something you can check.
- Before starting, tell it what 'done' means.
- Before starting, validate the direction with a prototype and design document first.
- After it's done, have it prove it with screenshots and comparisons.
- Spend your own energy only on the most important issues.
发布时间: 2026-11-23 08:41