London

June 28–29, 2027

New York

September 15–16, 2026

Berlin

November 9–10, 2026

AI code is correct and still costs you more

Correct code. Hidden cost.
August 20, 2026

Estimated reading time: 3 minutes

Key takeaways:

  • AI-generated code is fast and reasonably correct, but inefficient in ways that add real downstream cost, driving 5-8% higher compute and memory growth.
  • The review burden shifted onto humans: AI-generated changes triggered 1.92x more blocking review threads and 1.39x more comments.
  • Lack of codebase context is the root cause, an architectural problem, not just a model-quality one, and it won’t necessarily improve as models get better.

AI-coding tools have swept through organizations because of their speed: you type in a prompt, and it spits out code far faster than a human ever could. However, a year-long study of 3.52 million changes inside a large unnamed technology company suggests that saving time at the keyboard can create costs elsewhere.

Researchers looked at AI-generated C++ code as it moved from authorship by an AI model through the review process, and ultimately into production. Within the organization the researchers studied, by March 2026, AI was behind more than two in every three lines of submitted code with a known provenance.

The quality of the code was pretty good, too – while AI-written C++ had slightly lower rates of some correctness and safety issues, it was less likely to be reverted after deployment.

But what the code did showed inefficiencies that would make some engineering managers grumble if their human staff had written it. It used nearly twice as many loops, made 30% to 40% fewer calls to standard libraries and APIs, and was more prone to copying and allocation overheads.

Reviewers also had to work harder. Any AI-generated changes garnered 1.92 times as many blocking review threads and 1.39 times as many comments, while AI-heavy functions showed around 5% higher compute growth and 8% higher memory growth.

“For many software engineers, this shift is not a pleasant one,” says Annie Vella, a distinguished engineer at Westpac New Zealand. “Personally, I always found debugging quite enjoyable, but I don’t think many people have ever enjoyed reviewing code. Maintenance also feels like quite a chore.”

More haste, less speed

The paper highlights one potential pitfall of AI-generated code: while it’s possible to produce it quickly and at scale, what happens when it enters production can be messier and less effective than first hoped.

Writing code was never the part of the software engineering process that took the most time,” explains Kelly Blincoe, associate professor of software engineering at the University of Auckland. “It could be difficult, and it required training and skill, but it never consumed the majority of the software development process.”

Blincoe points out that “there is so much more to software engineering, from understanding an actual users’ needs, to designing the architecture, to verifying the software works correctly and solves the problem it was designed for.”

AI-generated code may be useful, but it’s not always the most efficient or effective way of producing software. “AI-generated code does not optimize for all of the software quality aspects like maintainability and efficiency,” says Blincoe. “Models are trained to pattern match against large volumes of code, and they often lack context of the existing codebase and its architecture.”

Context is king

As AI models don’t always have the full visibility into a software system, and because they don’t have the context of where a software project fits into the broader organization, the code they can create often duplicates existing code.

“In a highly modularized or distributed system, it will be harder for the harness or agent to know where to look for potentially relevant context,” explains Vella.

The same thing happens with human software engineers, Vella points out. “They might not know that somebody has already written a reusable utility class in a repo that they’ve never seen before, so they would reimplement it in their own solution,” she says. “That’s how you end up with duplication and sprawl.” However, they can talk to each other.

“We have seen drastic improvements over the past couple of years, so, yes, probably the quality of AI-generated code will continue to improve,” says Blincoe. “I think architectural fit is still going to be a problem.”

LeadDev Berlin promo

Measuring only the amount of code produced is not telling the full story, says Blincoe. “Other costs like compute time once deployed and token cost also need to be factored into the equation to really understand the impact of AI-code generation. These are less about productivity, and more about the full cost of creating and maintaining software.”

That’s something engineering leaders ought to bear in mind when thinking about how to handle AI-generated code. “The more basic numeric metrics will tell you something about how you’re performing activities,” says Vella, “but not so much about whether you’re achieving the outcomes that you set out to achieve.”