The Drift Series Part Four: Does AI Create More Code Drift? We Checked.

Parts 1 through 3 were examples of drift: failures that broke, hid, or misled, in code that reported success anyway. This one is the question those examples kept raising: Does it matter who wrote the line?

Jonathan Gordon

•

Looking down at a pair of man's feet in brown dress shoes. In front of the shoes are the words "AI" with an arrow pointing left and "Human" with an arrow pointing right.


Part 4 of The Drift Series, and the last one. Parts 1 through 3 were examples of drift: failures that broke, hid, or misled, in code that reported success anyway. This one is the question those examples kept raising: Does it matter who wrote the line?

Key findings

ReWeaver AI’s DriftDetector scanned 20 open-source repositories and, for this final post in the series, every source line in all 20 were attributed via git blame and classified by who wrote it: an AI agent, a human with an AI co-author, or no AI recorded. Findings were then divided by surviving lines in each category to answer the question in the title with a rate, not a raw count.

Question

Answer

  1. Does AI-written code drift more than human-written code?

Not meaningfully — pooled 1.14×, but the per-repository median is 0.87×, with a range of 0.06×–3.07×

  1. In how many repositories did AI-written code drift more?

7 of 17 repositories with enough data to compare — roughly a coin flip

  1. Does AI write more code than humans, even at the same defect rate?

Yes — about 2.07× the surviving lines per contributor (median), in commits about 1.35× larger

  1. How much of all hand-written code came from AI agents?

About 5% of hand-written lines added, by volume, across the 20 repositories

  1. If not authorship, what’s actually driving more drift now?

Throughput — more code shipped faster, by everyone, not worse code specifically from AI

What is “drift”?

Drift is what happens when a codebase stops matching its own decisions — quietly, without breaking a test or failing a build. Parts 1 through 3 of this series showed what that looks like in practice: caught exceptions that never surface, hardcoded values that bypass a design token, tests skipped and never restored. This post is where the series tests the question those examples kept implying — whether AI authorship predicts more of it.

Design-system drift is the larger and quieter half of what the engine finds, and it’s where the authorship question gets its cleanest answer: the same divergence, written by a machine and by a person, in the same codebases — sometimes as the identical line of code.

Three lines, three production codebases

THE FINDING, IN ONE LINE: Three identical positions: 'absolute' lines — one written by an AI agent, one by a person working with AI, one by a person alone — are indistinguishable in the code itself, and the authorship signal that looked visible at a glance disappeared once commit size was controlled for.

position: 'absolute',
position: 'absolute',
position: 'absolute',

One of these was written by an AI agent. One by a person working with one. One by a person alone. Nothing in the code says which.

We tested that properly: we normalized the shapes, compared literal values across repositories, and controlled for the fact that a single commit writes many lines at once, which would otherwise make one large AI commit look like a pattern. The signal did not survive the control.

Drift isn't something that arrived with AI. It's endemic to code. AI simply writes more code faster. A tool that only watched AI-written code would miss the 28,149 human-authored findings we found.

The same drift, from both hands

A quick gallery: nine more places the same handful of design-system violations show up, regardless of who was typing:

Repo Type

Domain

Pattern

Author

A browser city-building game

Design Consistency

Color written out instead of a token (color-jsx-hexa)

AI

A Bitcoin wallet for iOS and Android

Design Consistency

Spacing value off the scale (spacing-hardcoded)

AI + Human

An AI-first visual design tool

Design Consistency

Arbitrary type size (bracket-font)

AI

The front end for a node-based AI image tool

Design Consistency

Styling on the element itself (inline-style)

AI

An MQTT client

Maintainability

!important, to win an argument (important-override)

AI

A browser-extension crypto wallet

Design Consistency

A stacking value chosen by hand (hardcoded-z-index)

—

An AI-first visual design tool

Design Consistency

Type sized at the call site (font-size-jsx)

AI

A Bitcoin wallet for iOS and Android

Design Consistency

Type sized at the call site (font-size-jsx)

—

A browser-extension crypto wallet

Design Consistency

Positioned out of flow (position-absolute)

AI

Does machine-written code drift more? The short answer: No.

Pooled across 20 repositories, AI-authored code carries 1.14× the drift of code with no AI involvement recorded — but the repository-by-repository median is 0.87×, the direction flips in 7 of 17 comparable repos, and AI agents write roughly twice as much code per contributor.

Counting findings alone can’t answer that, because the three populations — AI-authored, human-and-AI co-authored, and no-AI-recorded — are wildly different sizes. The question needs a denominator: how many surviving lines at HEAD each provenance actually wrote, which we got by blaming every source file in all twenty repositories line by line, using the same exclusions the findings use.

Author

Findings

Surviving lines

Per 1,000 lines

An AI agent

1,354

86,066

15.7

AI + Human

4,125

448,877

9.2

No AI recorded

28,149

2,040,830

13.8


Pooled, machine-written code carries 1.14× the drift of human-written code. Taken repository by repository, the median is 0.87×, the range runs from 0.06× to 3.07×, and machine-written code drifts more in seven of seventeen repositories — a coin flip.

The pooled figure and the median disagree about the sign, and the spread between repositories is fiftyfold. There is no clean verdict here, and we’re not going to manufacture one.

AI writes the same frequency of drift twice as fast.

Across the same repositories, a single machine identity adds about twice the source lines of the average human contributor (median 2.07×), in commits about a third larger (median 1.35×) — while accounting for roughly 5% of hand-written lines added overall. Same defect density, more code per unit time.

Conclusion

Drift is not new. AI just changes how fast it accumulates, which is a throughput problem, not an authorship problem, and it’s exactly why detecting drift matters more now than before, not because AI writes worse code, but because much more code gets written much, much faster.

That’s the series. Four posts, 20 repositories, 125 findings read by hand, and one honest answer to the question we actually set out to test: no, AI doesn’t write significantly more problematic code. Bottlenecks mean more of this code ships without review. Research by Faros (2026) found that about 30% of code shipped without any human review.

Drift is making its way into production at a higher rate than before. That's something to watch. . . and prevent.

Frequently asked questions

What is code drift?

Code drift is the gap between what a codebase does and what its own standards, defaults, and prior decisions say it should do — accumulating silently because it doesn’t fail a build or a test.

Does AI-written code drift more than human-written code?

Not meaningfully. Pooled across 20 repositories, AI-authored code carries 1.14× the drift (findings per 1,000 surviving lines) of code with no AI involvement recorded — but the per-repository median is 0.87×, the range runs from 0.06× to 3.07×, and AI-written code drifts more in only 7 of 17 repositories with enough data to compare.

How was “drift” measured per author?

Every source line in all 20 repositories was attributed via git blame, then classified as AI-agent-authored, person-plus-AI-co-authored, or with no AI recorded. Findings were divided by surviving lines in each category to get a findings-per-1,000-lines rate, controlling for the fact that different authorship types wrote wildly different amounts of code.

Does AI write more code than humans, even if drift frequency is the same?

Yes. A single AI identity added roughly 2.07× the source lines of the average human contributor (median), in commits about 1.35× larger — while accounting for only about 5% of hand-written lines added overall.

If AI doesn’t write more problematic code, why does drift matter more now?

Because throughput went up. The same deadline pressure that has always produced drift now produces it faster, since more code is being written and shipped by everyone—not because any one author writes worse code.

Is DriftDetector free to use?

Yes. ReWeaver AI’s DriftDetector scans public GitHub repositories at no cost and with no signup at drift.reweaver.ai.


We found every example in this series with DriftDetector, our free deterministic scanner — no LLM guessing, same repo in, same findings out, every time, with a file and a line for each one. If you want to see what it finds in yours: drift.reweaver.ai

———————————————

JONATHAN GORDON is the Founder & CEO of ReWeaver AI, a platform that detects design-code drift at the point of generation in AI-assisted development. With nearly three decades of experience, he has shaped developer tools and enterprise software at Google, Apple, Microsoft, Oracle, and SAP. He holds two patents and specializes in human-centered design for complex systems, AI/ML integration, and developer tooling.