Abstract dark 3D geometric block structure with cyan light in the gaps, symbolizing AI code verification and trust.

For two years, the question around AI coding was whether agents could write good code. Developers have largely answered it: AI now generates or significantly assists 65% of the code they commit, according to Sonar’s 2027 State of Code Developer Survey. A year ago that figure was 42%, and this year’s number matches what respondents then expected to see a year later. Clearly, adoption is outrunning expectations.

“Clearly, adoption is outrunning expectations.”

This is because AI tools are getting better at coding, as shown by the increase in effectiveness our survey respondents (1,026 developers and engineering managers) reported alongside their increased adoption. The harder question is whether teams can trust what the agents ship. For most respondents, the report suggests the answer is “not quite yet,” but things are moving in the right direction.

The verification gap

Four numbers describe the problem:

  • 53% spend more time reviewing code than creating it, compared to 18% before adopting AI tools.
  • Despite this, 76% can’t verify code as fast as AI generates it
  • 94% don’t fully trust that AI-generated code is functionally correct.
  • However, only 39% always check AI-generated code before committing it, down from 48% last year. 

As adoption of coding agents continues to increase, this is now happening in systems that matter. Seventy-six percent say their team or company uses AI coding tools for business-critical or mission-critical services, a 31% increase from last year. 

The bottleneck moves downstream.

When code generation becomes abundant, review becomes the constraint. Left alone, it fails in one of two ways: reviews get stuck in a queue that eats the productivity gains, or verification quietly gets skipped. The data shows signs of both.

The side effects show up in the codebase too. Half of respondents say AI has produced unnecessary or duplicative code, and 34% report code that is hard to maintain or refactor. The share who say AI-generated code has made outages more frequent doubled, from 6% to 12%. Interestingly, 36% and 35% respectively say AI reduced outage frequency and reduced outage severity.

“When code generation becomes abundant, review becomes the constraint. Left alone, it fails in one of two ways: reviews get stuck in a queue, or verification quietly gets skipped.”

Security is more mixed. Concerns are shifting from vulnerabilities created in code touched by AI to vulnerabilities discovered in shipped code by bad actors with AI’s help. Respondents more often say AI-generated code reduced vulnerabilities than increased them (28% versus 15%). But 61% are very or extremely concerned that AI-powered attackers will find and exploit vulnerabilities faster and at greater scale.

Software factories raise the stakes

The pressure is about to increase with software factories: an environment where agents work autonomously on tasks. Thirty-four percent expect their teams to build or use agentic software factories within a year, compared with 5% today — that’s roughly a sevenfold jump.

A human reading every diff at the end of the pipeline does not scale to that model. If the volume of change grows by an order of magnitude and the review process stays the same, it’s unclear how confidence in code can realistically be established. For most organizations, this is because they don’t have the right pieces in place: 55% report AI-specific guidelines, policies, or quality gates, but only 23% describe those controls as well-defined and distinct, or automated.

Engineering confidence into the factory

Confidence has to be built into the system from the start; the survey results point to four priorities that organizations should implement to achieve this:

1. Intent: define the outcome before the agent starts. 37% name unclear requirements as a top source of toil, and 26% cite correcting or rewriting AI-generated code. Agents should have explicit business objectives, architecture standards, quality criteria, and security requirements to deliver against. Teams then have a basis for judging the result.

2. Guiderails: guide and govern agents as they work. Teams that give coding agents clear standards and controls are more likely to report 50%+ ROI than teams with few controls (32% versus 19%). In practice, that means supplying context and rules while the code is written, and setting limits on tool access and permissions.

3. Verification: check every change independently. 77% say strong verification tools increase their trust in AI code. Inline checks matter too; teams using automated review as AI code is written more often report positive security impacts than those without it (61% versus 46%). Independent checks and fixes before release are what separate code that is correct from code that merely looks correct.

“Independent checks and fixes before release are what separate code that is correct from code that merely looks correct.”

4. Evidence: make confidence measurable and auditable. If you can’t show what you checked, what you found, and what you fixed, you can’t defend a release decision or prove the investment paid off. But only 36% say their team measures AI’s productivity impact and can see the results. Forty-seven percent expect an ROI of 50% or more, but only 27% report achieving it, and 22% can’t say what return AI coding has delivered. 

Build confidence before scaling autonomy

The teams leading the charge are showing the way to AI-assisted software engineering by implementing code confidence. You can start with the agents already in your workflows: make requirements explicit, enforce boundaries and standards, check changes early and independently, and retain the evidence behind every decision. Engineers remain responsible for setting those standards and exercising the judgment that AI can’t replace.

As agents become more capable, the test of progress should not be how much code they produce or how little human involvement they require. It should be whether teams can deliver useful software faster without compromising security, reliability, or maintainability. Code confidence is what connects greater autonomy to that outcome: a consistent basis for deciding what is ready to ship, even as the tools doing the work change.

The post Why verification, not generation, is your secret to AI coding ROI appeared first on The New Stack.