BlogCategory
Artificial Intelligence

The Tip of the Iceberg: Most AI-Written Code Leaves No Trace, So We Trained a Model to Uncover it

Only 1.5% of public commits carry an AI signature, so we trained a model to find the rest. It turns out about 1 in 3 commits is now written with meaningful AI help.

Cover image

The Tip of the Iceberg: Most AI-Written Code Leaves No Trace, So We Trained a Model to Uncover it

Earlier this year we estimated that AI coding agents emit around 250,000 tonnes of CO₂e annually, and published how we got there. We arrived at that number based on what information we could verify: commits carrying a recognizable AI signature, like a co-author line from a coding agent. About 1.5% of all public commits carry one – far below what developer surveys suggest, where a majority report using AI tools regularly. So we set out to find the code that was very likely written by AI but carries no mark.

TLDR; most code written with AI has no signature. The code we had previously counted was only the tip of an iceberg. Below the waterline sits a much larger mass of AI-generated code and any true accounting of AI's footprint has to include it.

Why most AI code lacks signatures

An agent only leaves a signature when it is the author of the commit. More often, a human is looped in and the commit lands under their name. 

Four workflows account for most of it:

  • A developer reviews the agent's work and commits it themselves. The agent drafts; the human reads it, approves it, and commits it under their own name. 
  • A developer makes a few tweaks first. The developer takes the agent's draft and adjusts a variable or renames something, then commits the result as ordinary work.
  • The code is copied out of a chat. A developer asks Claude or ChatGPT a question in a separate window, pastes the answer into their editor, and keeps going. No coding agent is involved.
  • It comes from inline autocomplete. Many developer tools integrate AI to autocomplete code. Primarily AI-written and human-guided, it’s invisible in the commit record.

None of these common workflows are detectable by searching for a signature, so we had to recognize the code itself. 

Teaching a model what AI code looks like

A model is only as good as the examples it learns from, so we used two kinds of labels we could stand behind:

  • Confirmed AI code: We used the signed commits from our prior work. If an agent is listed as a co-author, most of that code was very likely written by AI.
  • Confirmed human code: We used two pools: code written before AI tools existed, and code from large, long-running open-source projects with policies that enforce human authorship, like the Linux kernel, the BSDs and Apache.

From there, we used pre-trained AI embeddings to feed the model hundreds of features to attempt to discriminate between human and AI-generated code. Our approach identified several elements such as the style and length of the commit message, how much changes at once, and which files are touched. We followed standard evaluation practice and withheld a portion of the labeled examples the model never saw during training to grade its performance.

Our model reached 89% accuracy on those withheld examples, but more importantly, is well calibrated. Calibration asks whether the model's confidence matches reality, and matters more than raw accuracy for estimating prevalence. The intuition is similar to weather forecasting: if a model says there's a 50% chance of rain tomorrow in 100 different cities, does it actually rain in about 50 of them? Ours holds up. Across a test set of 34,000 commits it predicted 38% were AI-written when the actual figure was 36%, with most of the overconfidence sitting in the middle of the probability distribution, where the model was least confident.

Model calibration performance by confidence level

Model predictions for validation data

What we found

As of early June 2026, we estimate that about 1 in 3 public commits were written with meaningful AI help, roughly 20x the share that carry a signature. That number has only been quickly steepening since early 2025 with no signs of flattening out.

What this tells us about our previous estimate

Two corrections pull in opposite directions:

  • Our earlier figure counted far too few AI commits. We had assumed about 1 in 2 AI commits were detectable; the data says only about 1 in 20 are. That means our earlier figure undercounted the number of AI commits by roughly 10x.
  • About half of all public commits are trivial. Our per-commit token estimate was based on a typical bug fix. In reality, roughly half of commits are very small changes (e.g., bumping a version, fixing a typo, reformatting, updating a dependency) and these would use a fraction of the compute of a typical bug. Interestingly, AI commits skew more substantive; only about a fifth are trivial.

What this means

Emissions from AI-generated code are already being undercounted, and the gap is widening. Adoption is still climbing, and each new generation of models is more compute-intensive than the last.

If you want to understand your own exposure, start by downloading usage reports from your AI providers. The AI-written share of your codebase is far larger than any count of AI-signed commits will show, and it is likely growing faster than almost any other line in your carbon inventory.

Keep an eye out for a coming post where we’ll turn to the rest of the market: what the published research and provider disclosures actually support for chat, image, and video generation, where the public data leaves gaps, and what that means for anyone trying to put a number on their AI emissions.

As always, this is an open conversation. If you have additional data, a critique, or a different read on the numbers, we'd love to hear it. Reach out to us at feedback@cnaught.com.

Related reading

All articles

Stay in the loop

Get CNaught's latest insights on carbon markets and climate action, delivered to your inbox.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.