AI code review when AI writes most of your code
When AI writes most of the code, review becomes the main quality control. Smaller changes, real tests, separate reviewers, package checks and reviewer fatigue.
Westerwick4 min read

On this page
When AI drafts most of your software, AI code review becomes a central quality control for your business. The review is where the time AI saved you should be spent. The habits that worked when a colleague wrote every line need to change shape.
This piece is for business leaders whose teams now ship AI-written code, and who want to know whether their review process still protects them.
Why AI code review needs human judgement
Two findings set the scene. GitHub, citing a January 2026 study, reports that "agent-generated code introduces more redundancy and more technical debt per change than human-written code", and that reviewers "actually feel better about approving it"1. We see a risk that polished-looking code receives less scrutiny than it needs.
Google's 2025 DORA research, a long-running study of software delivery, found AI adoption helps throughput, but "does continue to have a negative relationship with software delivery stability"3. Its explanation: "without robust control systems, like strong automated testing, mature version control practices, and fast feedback loops", more change means more instability3.
None of this is a reason to stop. As GitHub puts it: "This isn't an argument to slow down. It's an argument to be intentional"1.
Smaller changes, reviewed against the plan
AI makes it easy to produce a huge change in an afternoon. GitHub's own documentation warns that "review quality also degrades as pull request size increases"2. A pull request is the bundle of changes a developer asks to merge into the main codebase.
GitHub suggests asking for a smaller change when, for example, "you can't describe the purpose of the pull request in one sentence" or the change touches many unrelated files1. We'd add a business test: can the reviewer point to the approved plan and acceptance criteria this change delivers? Reviewing against the plan, rather than asking "does this look right?", is what turns review into control. We describe where that plan comes from in the task, plan, clarify, refine, approve, execute, verify loop, which is the loop we run ourselves.
Tests a person wrote or checked
AI can write tests, and it can write tests that prove nothing. GitHub's rule is direct: "Require a new test that fails on the pre-change behavior." If the AI can't write a test that would have caught the bug it claims to fix, the fix is incomplete1.
The other rule: "Any change that weakens CI is a blocker"1. CI (continuous integration) is the automated check that runs on every change. Deleted or skipped tests and lowered coverage targets are red flags, whoever made them. In our view, someone who understands the business requirement should write or at least read the tests for anything important.
A reviewer with different context from the author
The person or tool that wrote the code shouldn't be the only one to judge it. Automated review is useful for the mechanical pass. AWS's Amazon Q Developer, for example, reviews code with reviews "powered by both generative AI and rule-based automatic reasoning", checking for security issues, exposed secrets and risky third-party components5.
But GitHub's advice is to "treat it as a prerequisite, not a replacement"1. What can't be automated, it says, is judgement, and "judgment requires context only you have"1. Context means knowing the customer, the regulation and the system the change will run in.
AI review catches the typo. A person catches the change that compiles, passes the tests and is still wrong for the business.
Security, and the packages that don't exist
AI coding tools sometimes recommend software packages that don't exist. A study accepted at the USENIX Security 2025 conference tested 16 popular models across 576,000 code samples and found "the average percentage of hallucinated packages is at least 5.2% for commercial models and 21.7% for open-source models", with "205,474 unique examples of hallucinated package names"4. The researchers describe this as "a novel form of package confusion attack that poses a critical threat to the integrity of the software supply chain"4. We recommend checking that every suggested package exists and comes from a trusted publisher before installing it.
That makes dependency checking a standard review step. Amazon Q Developer's reviews include "software composition analysis (SCA)", which examines third-party components and dependencies5. OWASP's list of top risks for AI applications also names supply chain weaknesses, prompt injection and "excessive agency", meaning AI tools with more power than they need6. That applies to AI reviewers too: GitHub warns that "prompt injection in CI agents is real and underappreciated"1.
Reviewer fatigue is the real limit
The volume is already outpacing people. GitHub says "more than one in five code reviews on GitHub now involve an agent", and that while throughput has scaled, "human review capacity hasn't"1. DORA found 30% of respondents "report little or no trust in the code generated by AI"3, yet a tired reviewer will still click approve.
So the management decision is where to spend scarce review attention. Changes that touch payments, personal data, access control or anything irreversible deserve a senior reviewer and more time. Routine changes can rely more on automated checks. We discuss which situations call for slowing down in when AI-DLC should slow down instead of accelerate.
What to do next
- Keep AI-generated changes small, and require each one to name the approved plan or requirement it delivers.
- Require a test that fails on the old behaviour, and treat any weakening of automated checks as a blocker.
- Run automated security and dependency scans before a person reviews, and treat them as a first pass, not the decision.
- Make sure a named person approves every merge, and record who approved what.
- Decide which kinds of change get senior review, and protect reviewers' time so approval doesn't become a reflex.
Sources
- 1.Agent pull requests are everywhere. Here's how to review them.The GitHub Blog · 7 May 2026
- 2.Stack AI-generated code in pull requestsGitHub Docs
- 3.Announcing the 2025 DORA Report: State of AI-Assisted Software DevelopmentGoogle Cloud · 23 September 2025
- 4.We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMsarXiv (Spracklen et al., USENIX Security 2025)
- 5.Reviewing code with Amazon Q DeveloperAmazon Web Services
- 6.OWASP Top 10 for LLM Applications 2025OWASP Gen AI Security Project


