Alberto Angulo

Software · Review

Reviewing Code You Didn't Write

Code review always did several jobs at once, and catching bugs was the one it did least well. When agents write most of the code, machines should take most of the bug catching, people should read where machines are weak, and the depth of reading should follow what a change can break. Then the bottleneck moves to a few specialists.

Alberto Angulo11 min read · 19 October 2026

Ask engineers why they review each other's code and most will say: to catch bugs. When researchers at Microsoft classified 570 real review comments, only one in seven was about a defect. Comments suggesting improvements were twice as common. At Google, when engineers were asked about the comments on one specific change, only two of the 44 who answered said the review had found a bug.

Review was never mainly a bug filter. It was a bundle of jobs that happened to travel together while people wrote all the code. Agents pull that bundle apart, and that changes what a team should ask of its reviewers.

When agents write most of the code, machines should take over most of the defect catching, people should spend their reading where machines are weakest, and how deeply they read should depend on what a change can break, set by rules the agent cannot lower. Do that, and the bottleneck stops being reviewer time in general and becomes the few people who can judge the dangerous changes.

Four jobs in one

Code review did four things at once.

It caught defects, occasionally. It kept the design coherent, because someone who knew the whole system could see when a change duplicated a helper or bypassed a layer. It shared knowledge, because the reviewer learned the code and the author learned from the comments. And it put a second name on the change, so a person was accountable for what shipped.

An agent as author changes each job differently. Defect catching shifts most, because automated checks can run on every change and most defects a machine can detect never need to reach a person. Design coherence gets harder, because an agent has no stake in the system's shape and writes changes that are right locally and redundant globally. Knowledge sharing changes shape: the author learns nothing from the comments, and the reviewer may be the only person who ever reads the change. Accountability doesn't change at all, and matters more, because an agent can't be answerable for anything.

What's different about reading an agent's code

The usual warning signs disappear. Reviewers decide where to look from cues: awkward naming, a hedging comment, a messy change that suggests a confused author. Agent output has tidy formatting and confident comments whether or not the logic is right. That is a hypothesis about reviewer behavior, but a related effect has been measured: in a small Stanford study with an early code model, people using the assistant wrote less secure code and were more likely to believe it was secure. Plausible output can raise confidence faster than correctness.

The errors that remain are about meaning. Agents run compilers, linters and tests in their own loop (How a Coding Agent Actually Works), so what reaches a person already compiles and passes its tests. It can still solve the wrong problem: an assumption the request left open, an adjacent API, a rule that holds only for the tested inputs (Tests Are the New Specification). Design problems pass every test too.

There is much more to read. Faros AI, which sells engineering analytics, reports that under heavy AI adoption pull requests, the proposed changes submitted for review, were about half again as large, and median review time was about five times longer. A faster step upstream doesn't shorten the job when a slower step downstream sets the pace (Where the Saved Time Goes).

The author is always available and not fully reliable. An agent can summarize its intent, assumptions and risks in seconds. But the summary comes from the same context that produced the code, so it can leave out a decision or describe something slightly different from what was written. Treat it as a claim to check.

Comments no longer teach. A person told once that the team wraps database calls in a helper tends not to repeat the mistake. An agent starts its next session without the comment. A review comment that doesn't become a test, a lint rule or a line in the agent's instruction file will be written again next week. Turning each real failure into a permanent check is a ratchet, and review comments are one of its best sources.

Review catches fewer defects than people expect and does work that tests cannot. Both facts shape what to keep with people.

Let machines go first

By the time a person opens a change, everything a machine can decide should already be decided, with the evidence attached. Roughly from cheapest to dearest: the build, type checks, linters and formatters; the test suite, with new tests checked for meaning by mutation testing, which deliberately breaks the code to see whether the tests notice; static analysis, secret scanning and dependency checks, including a check that every imported package really exists, since models invent plausible package names; and an AI reviewer in a fresh context that sees the change and the requirements but not the reasoning that produced the code.

AI review is now a standard product, and vendors disagree about what it may decide. Anthropic's Code Review runs several agents over the change, checks its findings against the code to filter false alarms, and never approves or blocks a pull request. GitHub's Copilot code review comments by default, but in a public preview an administrator can let its approval count as the required review, the way a teammate's would. Neither vendor publishes a detection rate, and no independent measurement of how many serious defects AI reviewers miss on real production changes is publicly available.

So machine review belongs in the process as a filter on what people read, with a person's sign-off kept as the accountable step wherever the risk calls for one.

What people should read

Human attention should go where machines check poorly. Five places qualify.

Whether the change solves the right problem. The tests encode the request, and the agent wrote its code against the same request. Someone who holds the original need can see when a faithful implementation misses it. Ask which decisions the request left open, which way the agent went, and what the change leaves out, because an absence never shows up in a diff.

Whether it fits the design. A duplicated helper, a layer bypassed, a new dependency, a public surface that grew. Each passes the tests; judging them requires knowing what the codebase contains and where it is heading.

Security and data handling. Scanners find known patterns. They don't know which input is trusted, what a log line will expose, or who may call a new endpoint.

Irreversible operations. Migrations that drop or rewrite data, deletions, messages to customers. The questions are what happens if this runs twice, stops halfway, or meets production data unlike the test data, and what the way back is (Reversible Work and Irreversible Effects). Review the plan and the rollback before the code.

Whether the tests mean anything. A change that edits a function and its tests together deserves the closest reading of anything an agent produces.

Depth by risk, set by rules

Review depth should follow what a change can break, not how many lines it changes. A one-line edit to a permission check can matter more than a 2,000-line generated client.

Two rules make that workable. First, the risk tier comes from rules about what the change touches, never from the agent's own estimate: a file that assigns owners to paths in the codebase, detectors for migrations, new endpoints, dependency changes and edited tests, and a rule that a change takes the highest tier of anything it touches. The agent may ask for a higher tier and can never lower one.

Second, whoever owns the tiers checks that they hold. A random sample of low-tier changes gets read anyway, and every defect found after release is traced to the tier that let it through (How AI-Native Teams Organize). Without the sample, reviewers drift into automation bias, approving what looks familiar, and nobody learns that the low tier has stopped being low risk.

FIVE REVIEW TIERS · conceptual AUTOMATED GATES FIRST A PERSON READS TIER AND CHANGE TYPE T1 Docs, added tests 12 of 60 PRs a day Link check, lint, build, mutation check on new tests The summary and gate results. A random sample is read later. T2 Internal logic, good tests 30 of 60 Tests, types, static analysis, AI review in a fresh context Stated intent against the diff. Test diff first. One reader. T3 Public interface; tests 10 of 60 T2 gates plus contract and compatibility checks The interface, the changed tests, decisions the request left open. A named reviewer. T4 Security-sensitive 5 of 60 T3 gates plus scanners for security, secrets, dependencies Every line on the trust boundary. What is trusted, logged, exposed. A reviewer who knows the boundary. T5 Migration, irreversible 3 of 60 T4 gates plus a dry run on production-shaped data and a tested way back The plan and the rollback, read before the code exists. What if it runs twice, or stops halfway? The tier comes from rules on what the change touches, and a change takes the highest tier of anything it touches. The agent may ask for a higher tier and cannot lower one. Arrow: more human attention per change.
Review depth should follow what a change can break, and the agent cannot lower the tier. Five illustrative tiers with the automated gates that run first and what a person reads; the counts out of 60 pull requests a day are the example's assumptions.Conceptual illustration

Sixty pull requests a day

Here is what tiering does to a team, worked through with numbers that are invented to show the mechanism.

A team receives 60 agent-written pull requests a day: 12 trivial ones (documentation, added tests), 30 changes to internal logic with good tests, 10 that touch a public interface or edit tests, 5 security-sensitive ones and 3 migrations. Count only serious defects that survive the automated gates, and assume the riskier tiers carry more of them: about 1.8 a day in total reach reviewers. Assume a careful reviewer finds most of what they'll find early, so 10 minutes catches about 35 percent of serious defects, 30 minutes about 70, and an hour or more close to 90. The team has 26 reviewer-hours a day: five generalists and two specialists in security and data.

The tiered policy spends 3 minutes on the trivial tier, 10 on internal logic, 30 on public interfaces, an hour on security and an hour and a half on migrations.

Guess first

The tiered policy needs about 20 reviewer-hours a day, a third less than reading every change for 30 minutes. Does it let more serious defects through, fewer, or about the same?

A few more get through: about 0.64 a day, against 0.55 for reading everything for half an hour. Reading everything for an hour would let only 0.26 through, at 60 hours a day the team doesn't have.

REVIEWER-HOURS PER DAY FOR 60 PULL REQUESTS · illustrative model 0 10 20 30 40 50 60 reviewer-hours per day 26 h of capacity Uniform, 10 min each escapes 1.17 serious defects/day T2 10.0 h Uniform, 30 min each escapes 0.55 serious defects/day T1 T2 T3 30.0 h Uniform, 60 min each escapes 0.26 serious defects/day T1 T2 T3 T4 T5 60.0 h Tiered: 3/10/30/60/90 escapes 0.64 serious defects/day T2 T3 T4 T5 20.1 h T1 docs, tests T2 internal T3 interface T4 security T5 irreversible LOAD ON EACH POOL AS A SHARE OF ITS CAPACITY · tiered review 0% 50% 100% 150% Generalists 5 people × 4 h = 20 h 53% 10.6 h needed Specialists 2 people × 3 h = 6 h 158% 9.5 h needed Specialists, with evidence T4 40 min, T5 45 min: 5.6 h 93% Plus a third specialist with evidence: 5.6 of 9 h 62%
Tiered review protects nearly as well as heavy uniform review for fewer hours, and moves the bottleneck to the specialists. Reviewer-hours, escaping serious defects and load per reviewer pool for 60 invented pull requests a day under four policies; all inputs are assumptions.ComputedSource: Computed with the Python script in notes/A41.notes.md; catch probability 0.9 x (1 - exp(-m/20)) is an assumption.

Three things in this example are worth more than the numbers.

Tiering buys most of the protection for less. To match the tiered policy's escape rate with uniform review, you'd need about 25 minutes per change, roughly 25 hours a day. Tiering saves about a fifth of the reading. And returns diminish fast: going from 10 to 30 minutes a change costs about 32 reviewer-hours for each extra defect caught; going from 30 to 60 costs about 106.

The cheap tier carries most of the leakage. Internal-logic changes are individually safe, but there are 30 a day, and they account for about 61 percent of the defects that escape. Extra minutes there return little. Better automated gates and the sample audit return more: an AI pre-reviewer that independently caught 35 percent of serious defects would cut escapes from 0.64 to about 0.42. The word "independently" carries the weight, because a reviewer from the same model family as the author may miss the same things.

The bottleneck moves. Under uniform 30-minute review everyone is overloaded: 30 hours of reading against 26 of capacity, and a queue that grows without limit. Under tiering, the generalists use about half their time, and the two specialists are asked for 9.5 hours against 6 they have, 158 percent of capacity. The scarce resource is no longer reviewer time in general. It's the few people who can read a migration or an authorization change. Ignore that, and specialist changes wait or specialists skim, and the careful tier becomes a rubber stamp.

There are three responses. Give specialists evidence so they need fewer minutes: a dry-run report for migrations, scanner output for authorization changes. That alone brings their load down to about 93 percent, still a long queue. Add a third specialist, which with that evidence brings them to about 62 percent. Or change the architecture so security-sensitive and irreversible code lives in a few marked places, and fewer changes land in the top tiers at all.

The cheap tier carries most of the leakage, and the scarcest reviewers set the pace.

Who signs

An approval says a named person accepts responsibility for the change. An agent can't say that, and a person who clicks approve on something they didn't read has said it falsely.

The workable rules are the old ones. For public interfaces, security and migrations, a named human reviews, and that person is not the one who prompted the agent, which is segregation of duties. For the low tiers, the automated gates and the sample audit carry the weight, and whoever owns the tier rules answers for them. That's also how to read GitHub's option: an AI approval can reasonably count in a low tier the audit covers, and should be switched off for the high ones.

"AI reviewers will catch everything"

The strongest objection runs like this. People have never been good at finding defects by reading. Reading agent code at volume is tedious, and tired reviewers rubber-stamp. A model reads every line with the same attention at a falling price, and a human approving code they don't understand is performing a ritual.

Part of that is right. For style and common local bugs, a machine reviewer is likely to beat a tired human, which is why the design above gives it the first pass. It fails where it claims everything. No vendor publishes a detection rate to support it. A reviewer from the author's model family shares its training and its assumptions about what the code was for, and models tend to rate their own outputs higher. The hardest defects are mismatches with an intent that lives in people's heads. And two of the four jobs, accountability and shared understanding, aren't capability problems. A more accurate reviewer doesn't make a company answerable to its customers.

What to do

Build the gates before you scale the agents. In a codebase with weak tests and slow builds, the low tier isn't low risk. Fix that first.

Set tiers by rules, and let the agent raise them but never lower them. Then audit a random sample of low-tier changes and trace every escaped defect to its tier.

Count your specialists. Before adding agents, estimate how many high-tier changes per day your security and data people can read properly. That number, more than total reviewer hours, sets how fast you can safely go.

Make review cheaper per change. Ask agents for small, stacked changes so each piece gets the right tier: the migration alone, then the logic that uses it, then the interface. Review the plan before the code for anything irreversible. Ask for evidence (test output, command results) instead of claims, and check one stated decision against the diff.

Turn every repeated comment into a check. If you've written it twice, it belongs in a test, a lint rule or the instruction file.

Keep reviewers able to review. Reviewing agent code well takes knowing how code fails, which came from writing it, and heavy delegation can erode that. Rotate who reads the high tiers, and now and then seed known defects into the queue to see whether anyone notices.

Check yourself

Why is the agent's own summary of its change not enough?

It comes from the same context that wrote the code, so it can leave out a decision or describe something slightly different. Treat it as a claim to check.

Why must the risk tier come from rules and not from the agent?

An agent that sets its own tier could lower it. Rules about what the change touches hold, and the agent may only raise a tier.

In the sixty pull requests example, what became scarce?

Specialist time. Tiering made reading cheaper overall, but the two specialists were asked for more hours than they had.

Notes, sources and method

For readers who want to check the numbers behind Reviewing Code You Didn't Write. Sources were checked on 18 October 2026.

Key numbers

Number in the articleExact valueSource and dateNotes
One review comment in seven was about a defect; improvements twice as common78 of 570 comments (14%) on defects, fourth of nine categories; 65 of the 78 were small logic slips such as a wrong if condition; code improvements 165 (29%)Bacchelli and Bird, ICSE 2013 [1]17 developers in 16 Microsoft teams observed and interviewed; surveys of 165 managers and 873 programmers. Finding defects was still the top reason people gave for reviewing; understanding the change was the central challenge.
Two of 44 Google respondents said review found a bugIn survey questions about one specific change, two respondents reported a found bugSadowski et al., ICSE-SEIP 2018 [2]12 interviews, 44 survey responses, logs of about 9 million changes. Google introduced review mainly for readability and maintainability; developers named education, norms, gatekeeping and accident prevention. Median change 24 lines; median review under four hours; fewer than a quarter of changes had more than one reviewer; about 3.2 hours a week reviewing.
Reviews often miss functionality problemsCzerwonka and Greiler, 2015 [3]Abstract only.
Small Stanford study: less secure code, more confidence47 participants (33 with the assistant); less secure on four of five tasks; early OpenAI code modelPerry et al., CCS 2023 [5]Small sample, 2022-era model; no rate for current agents.
Faros: PRs about half again as large; median review time about 5xPR size +51%; median review time 5x; low versus high adoption within the same organizationsFaros AI, The Acceleration Whiplash [7]Vendor telemetry; full report gated and not read.
Anthropic Code Review never approves or blocksSeveral agents over the diff and surrounding code, verification step to filter false positives, severity ranking, token-based billing; Team and Enterprise plansClaude Code docs, accessed 18 Oct 2026 [8]Changed since 11 Oct 2026: no "research preview" label, flat price or 20-minute average on current pages.
GitHub Copilot approval can count as the required reviewComment reviews by default; Copilot approvals in public preview, off by default, can satisfy required-review rules and can be limited by file pathGitHub Docs, accessed 18 Oct 2026 [12]
No published detection rateNeither vendor's documentation reports one[8][12]Google's AutoCommenter, which enforced style-guide practices with a 2022 model, produced no statistically significant change in review duration in an experiment with about half of Google's developers [10].
Delegation can erode the skills supervision needs"Paradox of supervision"Anthropic staff study, 132 respondents, August 2025, published 2 Dec 2025 [11]Early adopters at an AI lab; selection bias flagged by the authors.

The worked example: method and assumptions

All numbers are assumptions chosen to show a mechanism; none is measured. Only serious defects (ones that would cause an incident if shipped) that survive the automated gates are counted.

TierPRs per daySerious defects per PR reaching reviewHuman minutes in the tiered policy
T1 docs, added tests120.0013
T2 internal logic, good tests300.0210
T3 public interface, or tests changed100.0530
T4 security-sensitive50.0860
T5 migration or irreversible30.1090
  • Defects reaching review: 1.81 a day.
  • Catch rate for a review of m minutes: 0.9 × (1 − e^(−m/20)), giving 35% at 10 minutes, 70% at 30, 86% at 60, 89% at 90. Loosely consistent with SmartBear's vendor claim that 60 to 90 minutes of review finds 70 to 90 percent of defects [4], and resting on nothing firmer.
  • Capacity: five generalists at four review hours a day and two specialists (security, data) at three: 26 hours.
  • Per tier: hours = count × minutes ÷ 60; escapes = count × defect rate × (1 − catch).
PolicyReviewer-hours per daySerious defects escaping per dayReviewer-hours per defect caught
Uniform, 10 minutes each10.01.1715.6
Uniform, 30 minutes each30.00.5523.7
Uniform, 60 minutes each60.00.2638.7
Tiered (3, 10, 30, 60, 90)20.10.6417.1
  • Equal-escape uniform policy: 25.39 minutes a change (25.4 hours a day); tiering saves 5.29 hours, 20.8%.
  • Marginal cost: 10 to 30 minutes costs 20 hours for 0.63 more defects caught (about 32 hours each); 30 to 60 costs 30 hours for 0.28 more (about 106 hours each).
  • T2 escapes: 0.39 of 0.64 (61%).
  • An independent AI pre-reviewer catching 35% of serious defects: escapes 0.64 to 0.42.
  • Loads: uniform 30 minutes, 30 of 26 hours (115%). Tiered: generalists 10.6 of 20 hours (53%); specialists 9.5 of 6 (158%).
  • Specialist evidence (T4 at 40 minutes, T5 at 45): load 5.6 hours, 93% of capacity; in the simplest queueing model (random arrivals, one server) the wait is ρ ÷ (1 − ρ), about 13 review-lengths. A third specialist with that evidence: 5.6 of 9 hours, 62%; without the evidence, 9.5 of 9 hours, 106%.

Sensitivity. If the catch ceiling is 0.6 instead of 0.9 (fatigue, automation bias), tiered review lets 1.03 serious defects escape a day and uniform 30-minute review 0.97: tiering is then slightly worse on defects and a third cheaper, and a uniform policy over capacity invites the fatigue that lowers the ceiling. If 20 percent of T4 and T5 changes are mis-tiered to T2 depth, escapes rise from 0.64 to 0.71, about 11 percent.

What it leaves out. Reading changes spreads knowledge of the system; uniform review does that for every change and tiering for some, and the model counts only defects. If shared understanding is worth a lot, tiering's cost shows up later; this is the strongest competing argument for broader review. Review time per change is also held fixed, while Faros reports larger pull requests under heavy adoption.

The script and its output are in the notes file for this article.

Caveats and open questions

  • Review size and speed. SmartBear, a vendor of review tools, advises 200 to 400 lines per review at under 500 lines an hour; its page cites its own Cisco study without size or date [4]. Google's small median change (24 lines) is a plausible reason its reviews were fast.
  • Duplication. GitClear reported from 211 million changed lines (2020 to 2024) that copy-pasted lines rose from 8.3 to 12.3 percent of changes between 2021 and 2024, while moved (refactored) lines fell from 25 percent to under 10 percent, the years AI assistants spread [6]. An association; vendor data.
  • Agent descriptions. No measurement was found of how often an agent's description misdescribes its diff.
  • Plan before code and evidence over assertion are vendor guidance (Anthropic's among others) [9], which also warns that a reviewer prompted to find gaps will usually report some even when the work is sound, so findings should be limited to correctness and the stated requirements. For the highest tiers, a reviewer from a different model family may help, since shared training is a likely source of shared blind spots.
  • What would change the conclusion. If AI-reviewed, test-gated changes escaped at the rate of human-reviewed ones over a period long enough to include rare expensive failures, the internal-logic tier could shrink to sampling. DORA 2025 (nearly 5,000 respondents) found AI adoption associated with higher throughput and still with lower delivery stability [13]; a reversal of the stability result would weaken the case for heavy human review. If agents became reliable at listing the decisions they made, reading for "the right problem" would get cheaper. If escapes traced by tier show the low tiers leaking more than expected, the tiers should move up.
  • Practice to stay able to review (rotation, recording what was and was not checked, seeding known defects) is judgment; no evidence says how much practice is enough. See Skills That Fade When the Machine Does Them and From a Good Demo to a Working Department.
  • Figure dropped in the 19 Oct 2026 rewrite: a41-review-flow (the path of a change from brief to merge, with the audit loop); its content is in the article's tier rules.

Sources

  1. Bacchelli, A. and Bird, C. Expectations, Outcomes, and Challenges of Modern Code Review. ICSE 2013. https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/ICSE202013-codereview.pdf
  2. Sadowski, C., Söderberg, E., Church, L., Sipko, M., Bacchelli, A. Modern Code Review: A Case Study at Google. ICSE-SEIP 2018. https://sback.it/publications/icse2018seip.pdf
  3. Czerwonka, J. and Greiler, M. Code Reviews Do Not Find Bugs: How the Current Code Review Best Practice Slows Us Down. IEEE, 2015. https://www.microsoft.com/en-us/research/publication/code-reviews-do-not-find-bugs-how-the-current-code-review-best-practice-slows-us-down/
  4. SmartBear. Best Practices for Code Review. Accessed 18 Oct 2026. https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/
  5. Perry, N., Srivastava, M., Kumar, D., Boneh, D. Do Users Write More Insecure Code with AI Assistants? CCS 2023, arXiv:2211.03622. https://arxiv.org/abs/2211.03622
  6. GitClear. AI Copilot Code Quality 2025. https://www.gitclear.com/ai_assistant_code_quality_2025_research
  7. Faros AI. The Acceleration Whiplash. Accessed 18 Oct 2026. https://faros.ai/research/ai-acceleration-whiplash
  8. Anthropic. Code Review and Code Review costs and usage. Claude Code documentation, accessed 18 Oct 2026. https://code.claude.com/docs/en/code-review and https://code.claude.com/docs/en/code-review-costs
  9. Anthropic. Best practices for Claude Code. Claude Code documentation, accessed 18 Oct 2026. https://code.claude.com/docs/en/best-practices
  10. Vijayvergiya, M., et al. AI-Assisted Assessment of Coding Practices in Modern Code Review. AIware 2024, arXiv:2405.13565. https://arxiv.org/html/2405.13565
  11. Anthropic. How AI is transforming work at Anthropic. 2 December 2025. https://www.anthropic.com/research/how-ai-is-transforming-work-at-anthropic
  12. GitHub. About GitHub Copilot code review and Using GitHub Copilot code review. GitHub Docs, accessed 18 Oct 2026. https://docs.github.com/en/copilot/concepts/agents/code-review
  13. DORA (Google Cloud). Announcing the 2025 DORA Report. 23 September 2025. https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report

All writing