Newshot

Linear changed code review for AI-written code

Original text(via HN AI)

Code review at Linear

Our code review process was designed for a world in which humans wrote the code.

That’s true of most engineering teams, and like most, we found that if we reviewed code like we used to, it would absorb much of the speed gained from agents, without necessarily improving quality. On the other hand, relaxing review requirements would mean moving faster with less confidence in what we shipped.

The right balance is a moving target. And to calibrate where it lies, we optimize for one thing above all else, the judicious use of human attention.

What follows is our approach to this problem today; how our review process has changed and the engineering practices emerging alongside it. Some of these practices may prove brittle as agents become more capable, and we expect our thinking to adapt alongside them. We also offer some thoughts on where code review might be headed, and will continue sharing what we learn along the way.

The old way, human review by default

Every change to our codebase has traditionally required two humans before it could be merged, the engineer responsible for the code, and another engineer on the team who would review it.

This worked well when engineers wrote most of the code themselves. But the release of GPT-5.2 and Claude Opus 4.5 in late 2025 marked a step change in AI coding, prompting us to rethink our approach.

The first sign that a shift was imminent was the sheer increase in the volume of code being shipped.

Between January and October of 2026, the number of PRs merged into the codebase increased by 153%, from 2,111 to 5,341 (with a temporary dip in April when we were at a team offsite).

图表:Merged PRs Includes only PRs merged into master

Number of merged PRs from January to October 2026

PeriodMerged PRs
Jan 262,111
Feb 262,715
Mar 263,382
Apr 262,542
May 263,091
Jun 263,118
Jul 263,118
Aug 263,372
Sep 264,007
Oct 265,341

Over the same period, the number of human authors to the codebase grew from 58 to 71, by just 22%.

In other words, the increase in code was outpacing the growth of the team; with a 2x increase in the number of PRs merged per human author.

图表:Merged PRs per human author

Number of merged PRs per human author from January to October 2026

MonthMerged PRs per human author
Jan 202636
Feb 202644
Mar 202652
Apr 202639
May 202649
Jun 202648
Jul 202650
Aug 202652
Sep 202659
Oct 202672

The pressure on our review pipeline had started to build earlier in the year.

With more code being produced, engineers were being asked to review more of it; between January and June, review requests per human author increased by 38%.

Adding to that pressure, the PRs themselves were getting larger. In January 2026, the median PR changed 47 lines of code, and by July, that had more than doubled to 108 lines of code.

PR size from January to July 2026

MonthMedian75th percentile90th percentile
Jan 202647151442
Feb 202647153442
Mar 202642160465
Apr 202648198519
May 202666225576
Jun 202678240586
Jul 2026108332763

Another less obvious, qualitative change was also taking place in parallel. As agents took on more of the implementation work, the role of the author began to look increasingly like that of a reviewer.

The engineer responsible for a PR was now often reviewing code written by an agent, rather than code they’d written themselves. Meanwhile, the second human reviewer was expected to review the same changes.

Often both engineers would use agents to help with this. We started experimenting with automated review tools to find bugs but these reviews were always a first pass; the author and another human reviewer would still look over the code before it was merged.

In effect, we had retained a review process designed for a world in which humans wrote the code, even as that was becoming less and less true.

The new way, human review where it matters

Today, every PR is reviewed by an agent first. Once the author has addressed the feedback, they can self-approve and merge if they’re confident in the changes. A second human review is still an option, but it is no longer the default for every change.

Our practices evolved as we learned where human attention was most valuable, and in July 2026, we started to notice a shift in our data.

From January to June 2026, only around 2.5% of merged PRs were reviewed by the author alone (and these are largely attributable to fixes made under exceptional circumstances). July marked a turning point, when 14% of PRs were merged without a second human review. That share grew steadily over the following months, reaching 53% in October.

Share of merged PRs by human reviewers requested from January to October 2026

PeriodAuthor onlyAuthor +1 reviewerAuthor +2 or more reviewers
Jan 261%50%49%
Feb 261%52%47%
Mar 262%50%48%
Apr 264%47%49%
May 262%45%53%
Jun 263%46%51%
Jul 2614%39%47%
Aug 2622%42%36%
Sep 2637%34%29%
Oct 2653%28%19%

Our engineers are now merging more PRs than ever, while the number of requests for their attention as reviewers is falling.

In October, the number of PRs merged per human author reached 72 a month, double the January figure of 36. Meanwhile, requests for human review per author had fallen from 85 in June to 54 in October.

图表:Merged PRs per human author Review requests per human author

Merged PRs and reviews requested per human author from January to October 2026

MonthMerged PRs per human authorReview requests per human author
Jan 20263662
Feb 20264473
Mar 20265286
Apr 20263969
May 20264987
Jun 20264885
Jul 20265079
Aug 20265270
Sep 20265962
Oct 20267254

Having multiple engineers verify every change at the point of merging is no longer the best use of their time. As a relatively small, experienced engineering team, we trust each engineer to judge when another pair of human eyes is needed.

There’s no fixed set of rules for making that judgment, but it generally comes down to the nature of the change and the potential consequences of getting it wrong.

Changes that are often self-approved

  • Run-of-the-mill bug fixes
  • Objective improvements, like refactors or performance improvements that don’t change behavior
  • Changes behind feature flags, which can be tested and adjusted before being exposed to users

Changes more likely to warrant a second human review

  • Unusually complex implementations, changes that depart from established patterns, or modifications to core components
  • Changes that visibly affect the user experience, where the review calls for product judgment as much as code correctness

That trust sits alongside explicit safeguards. For changes to sensitive areas such as authentication, infrastructure, and deployment configuration, a second human reviewer is mandatory, and the requirement is enforced automatically before a PR can be merged.

Recent data shows that the author’s experience and role also influence whether a PR receives a human review. Between September and November 2026, 79% of PRs from people in their first three months at Linear received a second human review, compared with 46% from those who had been at the company for more than two years.

Percentage of PRs receiving a second human review grouped by the author’s tenure at Linear

GroupPRs mergedHuman reviewedShare
0–3 months43334379.2 %
3–6 months41325461.5 %
6–12 months3,4861,52643.8 %
1–2 years1,51476350.4 %
2+ years5,6192,57545.8 %
All PRs47.8 %

We see a similar pattern across roles. While 46% of PRs authored by engineers received a second human review, that share rises to 65% for designers and 74% for people in Product and other roles.

Percentage of PRs receiving a second human review grouped by the author’s role

GroupPRs mergedHuman reviewedShare
Engineer10,7274,97646.4 %
Eng leadership15210166.4 %
Design52533964.6 %
Product & other614573.8 %
All PRs47.8 %

Build for fast feedback and reversibility

When mistakes can be detected and corrected quickly, it becomes more reasonable to rely on automated checks and selective human review.

Fast CI, frequent deployments, and small, focused PRs help us get changes into production sooner, and the ability to roll back changes easily means we can correct problems as they arise.

We also use Loops to investigate production errors. They search the codebase and production telemetry and find the likely cause before an engineer steps in.

Feature flags give us another way to limit the impact of changes we’re making. We typically enable new functionality internally first, before expanding to beta users and then a broader audience. This lets us test behavior and gather feedback before exposing a change to our whole user base.

Use working code to inform decisions

When writing code was expensive, it made sense to spend engineering time agreeing on an approach before implementing it. Now, engineers can build several alternatives and explore the trade-offs with colleagues before committing to any one. Each implementation, even the ones that are discarded, gives the team something concrete to test and learn from, helping clarify what to build next; and perhaps unsurprisingly, our team tracks those conversations as work in Linear.

One sign of this growing willingness to experiment is the number of PRs closed without being merged, which increased by almost 5x over the past year, with a steady uptick starting January 2026.

图表:Closed without merging

Number of PRs closed without being merged from October 2025 to October 2026

MonthClosed without merging
Oct 2025251
Nov 2025212
Dec 2025205
Jan 2026358
Feb 2026487
Mar 2026662
Apr 20261,005
May 20261,023
Jun 2026804
Jul 2026732
Aug 2026829
Sep 20261,155
Oct 20261,182

Ask agents to show their work

Another practice taking shape is asking agents to demonstrate that their changes work, rather than simply reporting that they’re done. This feels like an evolution of end-to-end testing and traditional QA.

We instruct agents to test the changes they’ve made and attach evidence to a draft PR, whether that’s before-and-after screenshots, a video showing how a feature behaves, or benchmarks demonstrating a performance improvement. For subtle visual changes, agents can annotate screenshots to make it easier to spot the differences.

The future of review

The practice of code review is clearly in flux. In the near term, we expect engineers to continue reviewing code, and we’ve built tooling in Linear to group related changes, explain their intent, and make meaningful edits easier to distinguish. However, it seems likely that the amount of manual code review will decrease over time as models and review agents improve.

As we’ve experimented with review agents, we find that most review code without the context of the decisions that led to it. Take a new engineer who opens a PR implementing a feature, unaware that the team has discussed and repeatedly decided against building it. If the implementation is sound, most review agents today would have little reason to flag it. They can assess whether the code works as intended, but lack the context to question whether the feature should exist in the first place.

We think the next evolution of review will make it easier for humans to review specific code when needed, make more PRs mergable without human review, and elevate the focus of review from technical implementation to a higher altitude. When review agents are capable of precise and thorough code review, we still need to evaluate whether the change deserves to be part of the product.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗