The question leadership teams ask about AI coding tools is usually some version of this: is the code better or worse than what our engineers write? I've stopped trying to answer it directly. After 22 years of watching the same tools and the same frameworks produce very different results in different teams, I don't think the tool is what decides. The checks around it do, and in my experience those are the part of the budget nobody wants to look at.
Two recent studies have just made the point more clearly than I could. They point in different directions on the headline question, and they agree on something else.
Two studies, two answers
The first is a paper dated 9 November from Dimas, Lu and Pnevmatikos (PDF). They followed 1,459 public corporate software projects, about 3.9 billion lines of code in total. They detected when a project first showed signs of AI use (configuration files, AI co-author tags in commits, agent-proposed changes), and compared its code quality before and after with similar projects that hadn't adopted yet. Quality came from SonarQube, a deterministic static-analysis tool, so the same code always gets the same score. The result will annoy anyone who expected "AI slop": issues and bugs per line went down slightly after AI use appeared, not up.
The second is a paper from Xia and Miller (arXiv:2607.09902), published in July. They tracked 182 open-source repositories with sustained agentic contributions for a year, and followed each change after it merged. Overall, agent-written lines survived about as well as human-written ones. But agentic code received a 46% higher corrective maintenance rate, meaning more of the later edits to it were fixes, and it introduced more security weaknesses and dependency vulnerabilities at merge.
So one study says quality held or improved, and the other says agent code needs more fixing. Both can be right, because they measured different things in different places. Dimas and colleagues looked at the whole codebase through a static-analysis lens. Xia and Miller looked at what happened to the agent's own commits after merge. I don't think either result is wrong, and I don't think the average from either one tells you much about your team.

What both studies say about the checks
Look past the headline and both papers spend their best pages on the variation between projects.
In the Dimas study, the quality gains sat in the half of projects with weaker practices beforehand, which the authors measured by human review, how changes get integrated, testing and configured automatic checks. The stronger half showed no corresponding gain. The authors point to testing as one channel: test files accumulated in the weaker half, and AI-marked contributions were more likely to include tests than other contributions in the same project and month. In other words, teams starting from little ended up with more checks.
In the Xia and Miller study, the strongest predictor of how much maintenance burden the agent's code created was how often the project merged code without review. Each 10 percentage points more unreviewed merges went with roughly 6% more agentic maintenance burden. Weaker test infrastructure and higher existing technical debt pointed the same way, though not strongly enough to count statistically.
I'd be careful not to tidy this up too much. The two studies disagree on which end benefits. Dimas finds the weaker-practice projects gained most, while Xia and Miller find weaker safeguards went with more burden. They use different samples, different tools and different outcome measures, and both are observational, so neither proves cause. My guess, and it is only a guess, is that "gained the most" and "carried the most risk" can both be true of a project that started with few checks. I don't know yet.
What pairing taught me about this
I spent two tenures at ThoughtWorks in teams practising extreme programming: test-driven development, pairing, continuous integration, collective ownership. Looking back, the most important thing about those teams wasn't any single practice. It was that writing code and checking code were the same activity. The second person at the keyboard saw every line as it was written. The test existed before the code did. Nobody called that a quality control. It was just how the code got made.
Agentic generation pulls those two apart. The "pair" is now a person looking at a pull request after the fact, or another model, or nobody. Xia and Miller put it well when they describe generation as having been "severed from the human constraint that used to pace it", while review stays bound to human comprehension. I wrote about the volume side of that in Your Agents Doubled the PRs. Nobody Doubled the Reviewers. What I'm interested in here is the spending side. If checking used to come bundled with writing, and now it doesn't, someone has to pay for it separately. Does anyone?
What teams say they do
TestMu AI, a testing-platform vendor, published its State of AI in Quality Engineering 2026 on 2 November, a survey of testers, developers and QA leaders from its own community, fielded from July to October. Two findings stood out to me.
First, only 41% of teams run any automated check on AI-written code before merge. Most rely on a person reviewing and testing it (55.1%), or on a QA team running tests after hand-off (51.4%). Only 34.1% have separate automated tests running in CI, and 5.4% admit to no check beyond the agent saying it works.

Second, when teams were asked where the majority of their AI testing budget goes, 50% named coding-agent seats or model API usage, which the report groups as generating output. Only 17% named testing platforms, eval and observability tooling or cloud test execution, which it groups as verifying. The report also notes that when teams count the return on AI in testing, they mostly count time saved. Far fewer count fewer production incidents or lower cost of quality.

I'd read these numbers carefully, and I want to be fair to the other side. It's a vendor survey of its own community, self-reported, with 43% of respondents based in India and 58% in SaaS, and the report itself says its subgroup figures are only directional. The budget question asks where the majority of spend goes, not the whole of it, and 22% answered "not sure". Spending on coding agents isn't wrong either. That's where the productivity is. And the Dimas result suggests the same tools can fund checks if you point them at it, since AI-marked work included more tests.
Still, it matches what I see when I look at how organisations talk about AI budgets. The purchase order has a line for the seats. It rarely has a line for what makes the output safe to ship.
What I'd do with this
I don't think there's a settled playbook, and I'd be suspicious of anyone selling one. But this is where I'd start.
Price the checks like you price the code. I built the Quality Signal Maturity Model to put quality risk in money terms, as cost of failure against cost of prevention. The cost-of-quality case I made at a Tier 1 bank, which released more than $1M over three quarters while a credit and lending programme moved to automation-first, worked because it put those two numbers next to each other instead of arguing that quality is a good thing. I'd do the same here: for every line of spend on generating code, ask what sits next to it for verifying it.
Make sure the check isn't the agent grading itself. In my current organisation, the principle behind the QA skills and agents I've built is that AI-generated code and tests enter production through defined control points, not trust. In practice I want at least some checks that don't depend on the model's judgement: tests that run in CI, contract checks, static analysis. Dimas and colleagues used SonarQube for exactly that reason, and it's why I'd be wary of leaning only on a model to review a model.
Watch the share of changes merged with no gate. It was the strongest predictor in Xia and Miller's data. I wouldn't turn it into a target. I'd use it as a smoke alarm, tracked per team, for AI-authored changes that reached main without a human or an automated check in the way.
Measure after merge, not only at it. Pull request counts and acceptance rates tell you how fast code arrived. They don't tell you how much of it came back as a fix. A rough version of Xia and Miller's question is within reach for most teams: of the changes tagged as AI-authored, how many were followed by a bug-fix commit, compared with the rest? It won't be rigorous, but it moves the conversation from volume to outcome.
Count escaped defects in the return on AI. If the case for AI tooling is told only in hours saved, the cost side of quality never appears in it. I'd put escaped defects and incidents in the same report as the time savings, so the two can't be separated.
Where I might be wrong
Both studies are observational and recent, and neither has been through the long scrutiny that would make me comfortable leaning on a single number. Dimas and colleagues' paper is only a few weeks old and I haven't seen it peer reviewed. Xia and Miller's authorship classification relies on commit signals, and they note that some "human" code probably had AI help, which would blur the comparison. The survey is a vendor's. And all of it describes code written with the tools and models of the past year, which may already be out of date.
This advice may also look overcautious in a year, if models get good enough that the checks matter less. I doubt it, but I'd rather be early on the checks than late. What I'd stand behind is narrower than "AI code is bad" or "AI code is fine". The code is only as safe as the checks it has to get past, and somebody has to pay for those checks.
Continue reading
- Your Agents Doubled the PRs. Nobody Doubled the Reviewers.
- The AI Productivity Lie: Your Engineers Merge Twice the PRs and Ship Nothing Faster
- The QA Budget Conversation Nobody Prepares For
Sources
- TestMu AI, State of AI in Quality Engineering 2026, published 2 November 2026, testmuai.com/research/state-of-ai-in-quality-engineering/. Figures used: 41% of teams run any automated check before merge; how AI-written code is verified (person 55.1%, QA hand-off 51.4%, CI tests 34.1%, agent self-check 14.1%, compile/type/unit only 12.4%, no check 5.4%); where the majority of AI testing budget goes (seats 29.6%, model APIs 20.7%; platforms 9.5%, eval and observability 3.9%, cloud execution 3.4%; 21.8% not sure) and the report's 50% generating versus 17% verifying grouping; ROI mostly counted in time saved. Sample and limits from the "Who took part" and "Method" sections.
- Dimas, Lu and Pnevmatikos, AI and Technical Debt: Evidence From 4 Billion Lines of Code, dated 9 November 2026, joaodimas.com/publications/ai-technical-debt/index.pdf. 1,459 projects, 3.9 billion lines; issues per line down 1.4% and bugs down 2.1% (chart only); gains concentrated in the weaker-practice half, none in the stronger half; AI-marked contributions more likely to include tests; SonarQube as the measure. Introduction, pp. 2 to 4.
- Xia and Miller, Do These Violent Delights Have Violent Ends? Measuring the Post-Merge Fate of Agentic Code, arXiv:2607.09902 (July 2026). 182 repositories, May 2025 to May 2026; agentic lines not significantly more or less likely to be terminated than human lines; 46% higher corrective maintenance rate and 45% higher bug-fixing rate; each 10 percentage points of no-review merge rate associated with roughly 6% higher agentic maintenance burden (Section VI); weaker tests and higher debt in the same direction, not significant; limitations on authorship classification; quoted passage from the Discussion.