Understanding AI Agent Code Changes by Looking at What Was NOT Modified
Code Does Not Lie, But It Omits
When you review an AI agent's code changes, you look at the diff. Lines added, lines removed, lines modified. That tells you what changed. But the more important question is: what did the agent decide not to change?
The negative space in a diff is where the real story lives. An agent that modifies a function but leaves a related function untouched made a decision - whether conscious or accidental - about scope. Understanding that decision is the key to catching bugs before they ship.
What Unchanged Code Tells You
When an agent changes one part of a system but not another, it means one of three things:
- Intentional scope limitation. The agent correctly identified that the related code does not need to change. This is the good case.
- Missed dependency. The agent changed a function signature but did not update all the call sites. The unchanged code is now broken.
- Incomplete understanding. The agent did not realize the related code existed. It solved the local problem without seeing the global picture.
You cannot tell which one it is just by reading the diff. You have to check.
How to Review Agent Code Changes
Go beyond the green and red lines:
- Check call sites. If the agent changed a function, search for every place that function is called. Were they all updated?
- Check related files. If the agent modified a data model, were the serialization, validation, and test files also updated?
- Check configuration. Code changes often require corresponding config changes. Agents frequently miss these.
- Check tests. Did the agent update the tests, or did it only change the implementation?
Building Better Validation
Automate what you can:
- Pre-commit hooks that check for broken references after agent changes.
- Type checking that catches mismatched function signatures.
- Integration tests that verify the full pipeline, not just the changed component.
The agent wrote the code. The code does not lie about what it does. But it is silent about what it chose to ignore. Your job is to listen to that silence.
Fazm is an open source macOS AI agent. Open source on GitHub.