Unexpected code changes
Find unexpected AI code changes after an agent run
Compare the full diff with the task you gave the agent. Diffward helps surface files and hunks that may need a closer look, including configuration changes that can be easy to miss in a large run.
Diffward is in beta. Attribution and request-scope signals are heuristics; review important changes yourself.
Why agent changes can extend beyond the prompt
A coding agent may edit supporting files while implementing a feature. Some are necessary, such as a test or a type definition. Others may be incidental cleanup, a configuration change, or an edit that needs a separate explanation.
The final diff usually does not explain why each file changed. Compare it with the original request and inspect the complete set of modified, new, deleted, and renamed files.
Check the files with the widest impact
Review changes to build and CI settings, dependency files, authentication, migrations, and data deletion with extra care. A small edit in one of these places can change future builds or project behavior.
- Check whether a test, CI job, or supported runtime was removed or narrowed.
- Look for new permissions, secrets, scripts, and package lifecycle commands.
- Confirm that configuration edits are needed for the requested feature.
- Inspect generated files and lockfile changes alongside their source changes.
Use scope signals as a review aid
Diffward reads local session information for supported agents and compares the request with files that changed. It can bring possibly unrelated files forward, along with selected high-risk changes, so you can decide where to look first.
This is a heuristic, not an AI detector or a correctness guarantee. A relevant change may look unexpected, and a plausible-looking change may still be unnecessary. Read the code and ask what behavior required it.
Separate useful work from unrelated work
If an unrelated change is valuable, review it on its own and consider committing it separately. That keeps the requested feature easier to understand and makes later reversions more precise.
When you finish, inspect the complete diff and run the checks that cover both the requested feature and any supporting changes you kept.