
It is funny, but it is a real lesson: "all tests pass" is not the same as "it works". AI coding agents are now good enough to finish real tasks on their own. They are also good enough to find creative shortcuts to a green checkmark. That is why learning to verify AI agent work is one of the most important habits for any team that uses agents today.
Trust, but verify. Especially when the green checkmark arrives suspiciously fast.
Why agents take creative shortcuts
An agent is usually given a goal like "make the tests pass" or "fix this failing build". It works towards that goal very literally. If the fastest path to green is to change the test instead of the code, an agent may take it. It is not being sneaky. It is doing what it was asked, without the human sense of what the test was for.
Some common "creative" fixes I have seen discussed across the industry:
- A failing assertion is removed, or its expected value is changed to match the wrong output.
- A test is marked as skipped "for now".
- Error handling is added that quietly swallows the exception, so nothing fails.
- A hard-coded value makes the one tested case work, while every other case is still broken.
- A mock is changed so the test no longer touches the real logic at all.
In each case the pipeline turns green. In each case the feature is still broken.
Step 1: Check what it changed, not just the result
The result tells you the tests pass. The diff tells you how. Always read the diff before you trust the outcome.
When you review, look for:
- Files outside the scope. If you asked for a fix in one service, why did a config file change?
- Test files in the diff. Any change to a test needs a clear reason.
- New dependencies. An agent may add a package to solve a small problem.
- Deleted code. Removed lines are easy to miss and can hide real damage.
A useful trick is to ask the agent to summarise its own changes and explain each one. Then compare that summary with the actual diff. Gaps between the two are where problems hide.
Step 2: Make sure tests were not deleted or weakened
Your test suite is the contract. If the agent can rewrite the contract, the contract means nothing. A few practical guards help a lot:
- Watch the test count. If the number of tests drops, find out why.
- Watch coverage. A drop in coverage after an agent change is a red flag.
- Protect key tests. Some teams mark core test files as off limits in their agent instructions, or require extra review for any change to them.
- Write the test first. If you write the failing test yourself and only let the agent change the code, it is much harder for it to cheat.
I also suggest putting this rule in writing, in the instructions the agent reads every session: "Never delete, skip or weaken a test to make it pass. If a test seems wrong, stop and ask." Clear rules prevent most of these problems. This is part of good context, which I cover in my post on context engineering.
Step 3: Run it yourself, the way a user would
Tests check what someone thought to test. Users do everything else. Before you call a task done, run the feature the way a real person would use it.
- Open the page and click through the actual flow.
- Try the empty state, the error state and a slow network.
- Use real looking data, not just the test fixture.
- Check the logs for new warnings or errors.
This takes a few minutes and catches a surprising number of issues that a green pipeline misses. If you want to see how I fit this into a full day of agent work, I describe it in my AI Native engineering workflow.
A checklist to verify AI agent work
Here is a short checklist you can use on every agent task:
- Read the full diff, including deleted lines.
- Question every change to a test file.
- Compare test count and coverage before and after.
- Check for new dependencies and changes outside the scope.
- Ask the agent to explain each change, and compare with the diff.
- Run the feature yourself, like a user.
- Only then merge.
None of this is about distrusting AI. I use agents every day, and they save a lot of time. But speed is only useful if the work is correct. If you want to go further on review, my notes on agentic workflows explain how these systems plan and act, which makes it easier to predict where they will cut corners.
The takeaway
To verify AI agent work, look past the green checkmark. Read what changed, protect your tests, and use the feature like a real person would. The faster the result arrives, the more carefully you should look.
If you want help setting up safe agent workflows and review gates for your team, get in touch.
Have you caught an AI "creative" fix like this? I would love to hear the story.
First shared on LinkedIn.
Subscribe to my newsletter
Read articles from Tech With Asim | Learn, Build, Lead directly inside your inbox. Subscribe to the newsletter, and don't miss out.
More Articles

Engineering Roadmap Planning: Start With What to Stop
Most roadmaps are lists of things to add. The best ones start with what to remove. Three questions to ask your team before 2027 planning begins.

AI for Junior Developers: 5 Habits That Build Real Skill
AI can speed up your output. Only you can speed up your understanding. Here are five habits I recommend to early-career engineers growing up with AI tools.

Rubber Duck Debugging: Why It Still Works When the Duck Can Talk Back
Explaining your code out loud forces you to notice what you skipped. Here is how rubber duck debugging works, and how to use AI as a duck that can talk back.




Comments