Skip to content

AI-authored code has nearly doubled, but so has PR size

Findings from our analysis of over 400 organizations from the past year.

Justin Reock

Deputy CTO

This post was originally published in Engineering Enablement, DX’s newsletter dedicated to sharing research and perspectives on developer productivity. Subscribe to be notified when we publish new issues.

In our Q1 AI impact analysis, we found that 27.4% of code was AI-authored. Because the space is changing quickly, the DX Research team reports on this metric quarterly to track changes in AI’s impact on organizations’ ability to create code.

To measure the change in AI-authored code, and the impact on quality, we conducted two analyses:

  1. First we measured the percentage of AI-authored code, using self-reported data from developers. We define the metric as code generated by AI without major human rewrites.
    1. As with any self-reported metric, there is potential for bias in both directions—undercounting from fully autonomous workflows and overcounting when developers treat AI use as a performance signal. In the future we’ll share what we’re seeing from DX’s AI Code Insights, which automatically measures the percentage of AI-generated code.
    2. Our sample included DX data from over 400 companies from Q2 (April 2026-June 2026), reported by the average of user responses within each company. We interpret this data as estimates of the proportion of coding workload delegated to AI tools, rather than literal measures of code output. This reflects the assumption that respondents anchor to how often they ask AI to do work rather than measuring how much code AI actually produces.
  2. Additionally, to evaluate the downstream impact of AI-authored code, we also looked at PR size using telemetry data from the same cohort over the last year (July 2025-June 2026).
    1. In the future we’ll share further investigations on the impact of increased AI-authored code, as well as the impact of increased PR size.

Here’s what we’re seeing.

AI-authored code is consistent across organization sizes

Our preliminary Q2 findings show that, on average, 51.9% of code is now AI-authored. Newer models, better workflow integration due in large part to usage of CLI tools, AI mandates, and learning curve progress have all contributed to this massive shift. While this indicates that AI is significantly impacting our ability to create code, it says little about the quality of the code being generated.

When segmented by organization size, our finding still holds. The median percentage of code that is AI-authored holds steady at around 50%. This reflects a broader shift in how code is produced, regardless of team size.

Median pull request size has nearly doubled

Because of the dramatic change in AI-authored code, we also looked at whether PR size—one measure for quality—has changed for the same cohort of companies over the past year. Interestingly, our data is showing an equally dramatic change: median PR size nearly doubled, growing from 44 lines to 72 lines per pull request between July 2025 and June 2026.

This finding confirms what many teams would expect: AI tends to generate more lines of code than humans. When the majority of code is machine-produced, that verbosity results in larger pull requests.

More broadly, this metric is becoming one of the most important to watch. Generally, more code can equal more complexity, less portability, and a greater potential for bugs and vulnerabilities. More verbose code can also be more difficult to review and maintain. One of the traits of a skilled engineer is the ability to fully implement a use case with exactly as much code as needed to perform the task. When AI undermines that instinct at scale, the result is not just technical debt. It is compounding cognitive debt across the team as engineers struggle to understand code they did not write.

The critical question for leaders: have review and quality processes kept pace with this volume? There’s been a lot of discussion in engineering leadership communities about how to shift processes to handle code review being the new bottleneck. I also appreciated Camille Fournier’s recent piece sharing guidelines for respectable use of AI, which outlines expectations leaders can set with their teams for using AI. If this is something you’re actively thinking about, please let me know in the comments—I’d love to hear from you.

Last Updated
June 17, 2026