How much production code is AI-generated

Practice3 min read

Estimates vary widely, but surveys from major development platforms suggest that somewhere between 20 and 40 percent of code committed in active codebases involves AI assistance in some form. The figure depends heavily on how you define 'AI-generated' and what kind of work you measure.

Why the number is hard to pin down

AI assistance exists on a spectrum. At one end, a developer accepts a single autocomplete suggestion for a variable name. At the other, an entire module is scaffolded by a coding agent and reviewed before merge. Both count as 'AI-generated' in most surveys, which makes the headline percentages difficult to interpret.

The measurement problem compounds this. Most organisations do not instrument their editors to track acceptance rates. Survey data relies on self-reporting, which tends to skew toward whatever answer feels socially acceptable at the time of asking.

What is clearer is that the proportion is rising. Estimates from 2023 and 2024 show consistent upward movement, and the tooling has improved significantly in that period.

Where AI output is heaviest

AI assistance is not evenly distributed across a codebase. It tends to concentrate in:

  • Boilerplate: configuration files, serialisers, test scaffolding
  • Repetitive patterns: CRUD endpoints, data transformations, form validation
  • First drafts: new files where the developer gives an outline and accepts a starting structure
  • Documentation and inline comments

Core business logic, security-sensitive code and anything requiring deep knowledge of a specific system's history tends to involve more human authorship, or at least heavier editing of AI output.

What 'AI-generated' obscures

The more useful question is how much code was properly understood before it was committed; how much came from a model matters less. A developer who reads, tests and takes responsibility for AI-suggested code is in a meaningfully different position from one who pastes output without review.

This distinction matters for quality, for debugging and for security. How to review AI-generated code covers the practical differences in what that review process should involve. The habits around human-in-the-loop engineering become more important as the raw volume of AI output increases.

Organisations that treat the percentage as a productivity metric without asking about review quality tend to accumulate technical debt faster than they realise. AI models are confident and fluent; they produce plausible-looking code that can pass a cursory read but fail under load, fail on edge cases or introduce subtle security issues.

How team structure affects the number

Teams using agentic coding workflows, where an agent handles multi-step tasks autonomously, will see higher percentages than teams using inline suggestion tools. The architecture of how work is divided between human and model shifts the number considerably.

Seniority also plays a role. More experienced engineers tend to use AI assistance for a higher proportion of lower-value work (scaffolding, tests, documentation) while writing more of the critical logic themselves. Junior engineers sometimes invert this, generating complex logic from prompts they do not fully understand and writing the trivial parts themselves.

What the number does not tell you

A team where 50 percent of code is AI-generated and reviewed carefully is likely in a better position than a team where 10 percent is AI-generated and committed without scrutiny. The percentage is a proxy for speed, not for quality or risk.

For the teams Miyagami places into, the working assumption is that AI assistance is a normal part of how production software gets built, and that the engineering skill is in directing, reviewing and owning what comes out of it, not in avoiding the tools.

What we test for

Our vetting reflects this directly. The AI-native assessment scores engineers on AI output verification, which tests whether they catch hallucinated APIs, subtly wrong logic or security gaps in generated code before it ships. Judgement by risk, scored across both assessments, addresses the related problem: an agent produces a copy change and a payment migration at the same speed and with the same confidence, and good engineers don't treat them the same way. See how we vet for the full picture.

Short answers

What percentage of code is AI-generated in 2024?

Estimates vary, but surveys suggest 20–40% of committed code involves AI assistance. The figure depends on how assistance is defined and how it is measured, and it has risen consistently year on year.

Does AI-generated code cause more bugs?

Not inherently. AI output that is committed without proper review, however, introduces bugs that are harder to trace. The risk is in the review process, not the generation itself.

Should teams track how much of their code is AI-generated?

It can be useful as a baseline, but the more informative metric is review coverage and defect rate by code origin. Raw percentage tells you little about quality or risk.

Let's talk

Get a shortlist within five working days

You share the roles and the stack in a short form or a thirty-minute call. Within five working days you get named senior engineers to review, each with both scorecards.

Reviewed onClutch4.9 out of 5 from 36 reviews
ISO 27001
Certified

Book thirty minutes with Dale

The calendar is provided by HubSpot, which sets its own cookies. Load it here, or book on HubSpot's page.

Open booking page