AI Wrote the Code. Who Answers When It Breaks?

AI Wrote the Code. Who Answers When It Breaks?

AI-generated code now writes a large share of the software the world runs on, and a simple question follows it into every engineering team: when AI builds the software, who is responsible for making sure it works? The code arrives quickly, the tests can be generated just as fast, and the person who used to write both increasingly stands at the end of the line, making the final call.

The question is not theoretical. SmartBear’s 2026 State of Software Quality and Testing report, based on a survey of 1,436 leaders and practitioners in the United States and the United Kingdom, found that 46% of teams have shipped AI-written code that later failed in production. The failure rate alone would be a story, but the more striking finding is what happened next: of the teams that shipped a failure, 69% still had a lot of confidence, or complete confidence, that AI-written code behaves as intended.

That gap between confidence and evidence is the heart of the accountability debate. The tools have changed who writes the code, but they have not changed who answers for it when something breaks. Across the reporting and research on this question, the answer keeps coming back to the same place: a human being, usually the engineer who approved and shipped the work, owns the outcome, whether or not an AI system produced the code.

Key takeaways

  • More than 9 in 10 development teams have adopted AI coding tools, with most generating at least 40% of their code through AI, according to SmartBear research cited by Computer Weekly.
  • 46% of teams have shipped AI-written code that later failed in production, according to SmartBear’s 2026 survey of 1,436 leaders and practitioners.
  • Of the teams that shipped a failure, 69% still had high confidence that AI-written code behaves as intended.
  • SmartBear’s Justin Collier says the engineer who approved and shipped the code owns the outcome, regardless of whether it was AI-generated.
  • Only 25% of teams have humans reviewing more than 80% of what their AI agents produce, even though teams that review more ship fewer failures.
Finding Figure Source
Teams that have adopted AI coding tools More than 9 in 10 SmartBear research via Computer Weekly
Teams that shipped AI code that later failed in production 46% SmartBear 2026 survey, 1,436 respondents
Share of AI code written or accelerated by AI 41% or more for 69% of experts SmartBear 2026 survey
Organisations unable to explain how AI contributed to a bug 47%, rising to 73% after a shipped failure SmartBear 2026 survey
Teams with humans reviewing over 80% of agent output 25% SmartBear 2026 survey

How the Chain of Responsibility Changed

Before AI coding tools became common, the chain of custody for software was short and clear. A human developer wrote the code, understood its dependencies, and could trace how a change might ripple through the system. That is how Justin Collier, senior director of product management at SmartBear, describes the old world to Computer Weekly’s Developer Network.

Collier’s argument is that this longer chain does not dissolve accountability. It concentrates it, with a human at the end. Responsibility is shared across large hybrid teams with widely varying technical depth, but the final call still belongs to a person. As he puts it, AI is a tool in the tool chest, only as effective as the person and team wielding it.

The Verifier Steps Forward

Two software engineers reviewing code together on a monitor
Code review is where accountability now concentrates: the person who approves and ships the change owns the outcome.

Verification, in this account, is a matter of judgement rather than speed. It means knowing what to trust, what to question, where the model’s confidence outpaces its accuracy, and what a passing test actually guarantees. Those are not things AI agents can do for themselves, Collier argues, and they are the reason the human at the end of the chain carries the weight.

That view is echoed by other engineering voices. Bert Jan Schrijver, chief technology officer at OpenValue, argues that responsibility for software has always been a team effort, shared by the people who reviewed, tested, designed and architected it, not only the person who wrote the code. When AI agents take over part of the delivery cycle, he says, responsibility does not shift from the developer to the agent, because the agent cannot be held accountable. The developer stays responsible, even when agents write the majority of the code, and the human responsibility only increases as more software is produced faster.

Why Confidence Keeps Outrunning Proof

Review coverage is the thinnest part of the picture. While 95% of leaders and 86% of practitioners say they are confident their AI agents’ work is adequately reviewed, only 25% of teams have humans reviewing more than 80% of what those agents actually produce. The survey also found that teams which review more of their agents’ work ship fewer failures than teams that review less, which suggests the gap is not harmless.

What the Other Positions Say

Not every voice in the debate lands in exactly the same place, but the direction of travel is consistent. Xano, a software platform company, puts it plainly: the organisation deploying the software is responsible, and specifically the humans who build, approve and operate it. Its model splits the work into three roles, build, approve and run, and argues that accountability without evidence is exposure, since the accountable person needs a legible view of what the agent built and a trustworthy record of how it reached production.

A similar argument comes from The Cloud Group, which writes that a code assistant suggests, while a person accepts, merges and takes responsibility. Its rule is simple: nobody merges what they cannot explain. The person responsible for a piece of code should be able to answer four questions about it, in business terms rather than implementation terms: what it does, why it is like this and what alternative was ruled out, what will break if it is replaced, and how to tell it is still working. Anyone who can answer all four is responsible for that code, whether a person or a tool wrote it, and anyone who cannot answer any of them is not responsible, even if they are listed as the author.

There is also a commercial angle that teams ignore at their peril. SmartBear’s survey found that more than half of respondents, 55%, experienced application quality issues in the past year because their testing could not keep up with development, resulting in revenue loss, outages and negative customer experiences. AI coding failures are already costing companies revenue, customers and trust, according to SmartBear chief executive Dan Faulkner, even as leaders remain confident the code behaves as intended. The strongest argument for clear ownership may simply be that failures have owners either way, and it is better to name them before the failure than after it. For teams choosing tooling, our roundup of the best AI tools for code documentation is a useful starting point, since documentation is one of the few things that makes AI-generated code legible to the next person who has to own it.

What It Means for Teams Shipping AI Code

The practical answer to the accountability question is less about blame and more about design. Teams that ship AI-generated code need a named human owner for every change, review gates that happen before code reaches production, and a record of what the agent built and how it got there. The owner does not need to understand every line, but they do need to be able to explain what the change does and why it is safe.

It also has consequences for who gets hired and trained. The verifier role needs people who can read code they did not write, challenge a confident-looking output, and say no to a change that passes its tests but does not match the intent. That is a different skill from writing code quickly, and teams that treat review as a formality will find their most important safety net is made of people who were never trained to hold it. The same judgement gap shows up in security work, where our piece on whether AI could break encryption looks at what happens when powerful new capabilities outrun the checks around them.

For individual developers, the message is both reassuring and demanding. The job is not disappearing, but it is changing shape. The developers who stay valuable are the ones who can verify, explain and stand behind what the machine produced. If you bring it to a review, it is your code, as Schrijver puts it, and that principle is likely to hold whatever the next generation of coding tools looks like. Game developers face the same shift in a faster-moving form, as our guide to the best AI tools for game development shows, where AI now generates assets and systems that still need a human to judge whether they play well.

A Checklist Before AI-Written Code Ships

  1. Name one human owner for every change, and record who approved it.
  2. Validate the specification before the AI generates code from it.
  3. Review the change yourself, and do not merge code you cannot explain.
  4. Use tests from an independent source, not tests the same AI wrote for its own code.
  5. Keep changes small enough that a reviewer can follow what changed and why.
  6. Check the change in production after release, and log what the AI contributed.

Frequently Asked Questions

Who is responsible when AI-generated code fails in production?

SmartBear’s Justin Collier says the engineer who approved and shipped the code owns the outcome, whether AI generated it or not. Xano agrees at the organisational level: the humans who build, approve and operate the software are responsible.

Can an AI coding tool be held accountable for bad code?

No. An AI system cannot explain itself to an auditor, weigh a trade-off against an organisation’s risk tolerance, or take responsibility when something goes wrong. Accountability rests with people, which is why teams name a human owner for every change.

How much code is AI actually writing now?

SmartBear’s research suggests more than 9 in 10 development teams have adopted AI coding tools, most generating at least 40% of their code through AI. Its 2026 survey found 69% of experts say AI writes or accelerates 41% or more of their code, up from 43% in January.

Why do teams stay confident in AI code after it fails?

In SmartBear’s survey, 46% of teams shipped AI code that later failed, yet 69% of those teams stayed highly confident it behaves as intended. The report calls this blind trust: 73% of leaders are highly confident, against 52% of practitioners.

What is the verifier role?

The verifier is the developer or quality engineer at the end of the pipeline, checking AI agents’ output and deciding whether it ships. Collier describes verification as knowing what to trust, what to question, and what a passing test actually guarantees.

How can teams make AI-generated code safer to ship?

Validate the specification before generation, keep a human in the review loop, use independently written tests, keep changes small, and record what the AI contributed. SmartBear found teams that review more of their agents’ work ship fewer failures, and only 3% rely on AI self-validation alone.

The Bottom Line

AI has changed who writes the code, but not who answers for it. The research and practitioner voices agree: when AI-generated code breaks in production, responsibility lands with the human who approved and shipped it, and with the organisation that deployed it. The machine can generate, test and even fix, but it cannot own an outcome.

The teams that do best with AI coding will not be the ones that generate the most code the fastest. They will be the ones that build verification to match the speed of generation, name an owner for every change, and keep a human in the loop who can explain what shipped and why. That judgement is not the bottleneck. It is the product.

on this page