AgentsAnalysis

Shipping AI-written code you don't understand: what the evidence says about 'comprehension debt', and what teams are doing about it

Shipping AI-written code you don't understand is now a mainstream worry, with an October 19, 2026 Ask HN thread drawing hundreds of replies. Here's what studies from Harvard, METR, Anthropic, Stack Overflow and DORA actually measured, what cases like PostgreSQL 19 show, and which review rules the official tools and projects document.

ByShajanthan YogeswaranFounder & Editor-in-Chief
Published
Reading9 MIN
Glass bars for code and pull requests up, a taller lit bar for review time up 49% and a flat sliver for issues resolved, on violet, titled Review time +49%
What’s new, in 20 seconds
  1. A Harvard working paper on 718 firms (Chen and Stratton, version of August 4, 2026) found that after firms adopted coding agents, lines of code per worker rose 30% and pull requests 23%, but review time rose 49% and resolved issues didn't change significantly. It doesn't measure bugs or reverts directly.
  2. Anthropic says Claude writes about 90% of Claude Code's code and that the share of merged pull requests needing a revert fell by more than 40% from June to September 2026. Its October 15 post also says 'Nobody on the team keeps a complete mental model of Claude Code in their head.' Both are vendor-reported.
  3. In Stack Overflow's 2026 survey (results published October 6), 48.0% of respondents said they trust AI output when they can easily verify it; only 6.6% trust it for important work decisions. Anthropic's Code Review docs say a review with no findings 'doesn't mean your code is error-free or secure.'
Contents

Shipping AI-written code you don't understand has become one of the most discussed problems in software teams that use coding agents. On October 19, 2026, an Ask HN post titled "How to deal with shipping AI-written code you don't understand?" drew hundreds of replies. Practitioners call the worry "comprehension debt": the gap between how much code a team ships and how much of it anyone understands. This analysis sets out what has been measured, what is still anecdote, and what official tools and open-source projects require before AI-written code ships.

This analysis is based on the Harvard working paper by Fiona Chen and James Stratton, METR's developer-productivity studies, Anthropic's October 2026 posts on how the Claude Code team reviews AI-written code and on employment at Anthropic, the Stack Overflow 2026 Developer Survey, Google's 2025 DORA report, project policies and official tool documentation, checked October 20, 2026. Hacker News comments are community reports (Tier 3) and are labeled as such.

The short version

  • Measured: at 718 firms, coding agents brought more code and more pull requests, but review time rose 49% and resolved issues didn't change significantly (Chen and Stratton, August 2026).
  • Measured, but small or dated: METR's 2025 randomized trial found experienced developers took 19% longer with AI while believing they were 20% faster. METR said in February 2026 that the finding is out of date and its newer data is unreliable.
  • Vendor-reported: Anthropic says Claude Code's revert share fell by more than 40% while merged pull requests more than doubled, and that its engineers don't keep a complete mental model of the codebase.
  • Surveyed: developers mostly trust AI output only when they can check it. Just 6.6% of Stack Overflow's 2026 respondents trust it for important decisions.
  • Not measured anywhere we found: how much AI-written code developers fail to understand, and whether that leads to more production incidents.

What are developers actually asking?

The Ask HN post, submitted by the user rzk, quotes a LinkedIn post by an engineer who says AI-generated code "all feels like a black box": he understands the high-level design but not every detail. These replies are community comments, not verified claims, but they show where practitioners disagree:

  • Design first, delegate implementation. "I don't let the LLM design the code at all, I let it implement a design I have created," wrote one commenter (bitwizeshift), whose team now holds joint design reviews.
  • Small changes and heavy testing. A compiler developer (spacedcowboy) described "a long planning session" and small check-ins, while admitting "I couldn't say I'd reviewed everything."
  • Tests aren't enough. Others replied that "Testing doesn't verify the design" and that LLM-written tests make weak guardrails.
  • Rubber-stamping. "I just approve PRs, because I have to. I don't know what else to do," wrote another (birdsongs), describing thousands of changed lines a week.

What does the measured evidence say?

EvidenceWho, whenWhat it measuredMain findingLimits
"Artificial Intelligence in the Firm: Bottlenecks in Software Production"Fiona Chen and James Stratton (Harvard); version of Aug 4, 2026Jellyfish platform data from 718 firms and 725,938 workers, Jan 2021 to Mar 2026; staggered difference-in-differencesAfter agent adoption: lines of code +30%, commits +20%, PRs +23%; review time +49% (baseline 7.03 days); share of PRs with changes requested nearly doubled; review comments per PR +35%; resolved Jira issues not significantWorking paper, not peer-reviewed; one vendor's customers; no direct bug or revert measure; agent use partly undetected
Early-2025 developer studyMETR; Jul 10, 2025Randomized trial: 16 experienced open-source developers, 246 tasks in their own large repositoriesTasks took 19% longer with AI allowed; developers expected a 24% speedup and afterward believed AI had sped them up by 20%Small sample; early-2025 tools (mainly Cursor Pro with Claude 3.5/3.7 Sonnet); METR now calls it out of date
Developer productivity updateMETR; Feb 24, 2026Follow-up with 57 developers, 143 repositories, 800+ tasksEstimated speedups of 18% (returning developers) and 4% (new recruits), with wide intervalsMETR calls the data "an unreliable signal" because developers skipped tasks they didn't want to do without AI
"How employment is changing at Anthropic"Anthropic; Oct 16, 2026192 engineers adopting coding agents vs 74 who didn't"No difference in rates of lines of code subsequently removed or reverted"Vendor-reported, about its own staff; adoption not random; "AI errors may be harder to identify than human ones"
"How the Claude Code team does code review"Anthropic; Oct 15, 2026Claude Code repository, June to September 2026Merged PRs more than doubled; share needing a revert fell by more than 40%Vendor-reported; no absolute revert rate; no outside audit
2026 Developer SurveyStack Overflow; results Oct 6, 202630,903 responses from 169 countries48.0% trust AI output when they can easily verify it; 12.3% don't trust it for most work tasks; 6.6% trust it for important decisionsSelf-reported attitudes; trust question n = 14,304
2025 State of AI-assisted Software DevelopmentGoogle's DORA team; Sep 23, 2025Survey of nearly 5,000 technology professionals30% report little or no trust in AI-generated code; AI adoption still has a negative relationship with delivery stabilitySurvey-based; a 2026 edition of this report wasn't located

Table 1None of these studies measures comprehension directly, and the Anthropic rows are vendor-reported. Sources: each study or survey as named, checked October 20, 2026.

Last verified: October 20, 2026

Two patterns stand out. First, the strongest outside evidence is about review load, not understanding: more code arriving, reviewers taking longer and no measured rise in finished work. Chen and Stratton infer a higher bug rate from review outcomes but don't measure bugs. Second, self-reports are unreliable here. METR's 2025 trial found a 39-point gap between how fast developers felt and how fast they were, which matters for any team judging its own comprehension by how confident it feels.

What changed after firms adopted coding agents

change after agent adoption, 718 firms (working paper)

Lines of code per worker+30%
Commits+20%
Pull requests+23%
Review comments per PR+35%
Review time+49%
Resolved Jira issuesNot significant
Show the data
MeasureChange
Lines of code per worker+30%
Commits+20%
Pull requests+23%
Review comments per PR+35%
Review time+49%
Resolved Jira issuesNot significant
Figure 1Review time rose more than code output did, while resolved issues didn't change significantly. Source: Fiona Chen and James Stratton (Harvard), working paper, version of August 4, 2026, as of October 20, 2026.

What do the real-world cases show?

PostgreSQL 19. In an October 9 post, "The reverts will continue until morale improves," committer Peter Eisentraut said about 8 to 10 significant features were reverted this cycle. He argued that with LLM-assisted review, defects "can get found much faster," leaving developers "staring at a list of like forty defect reports" (an illustration, not a count). He also says the situation "is not due to 'vibe coding'," because the code predates it. Here AI review exposed problems in human-written code faster than people could fix them (our report).

QGIS and other bans. QGIS approved a flat ban on AI-, LLM- and agent-assisted code on October 7, 2026, joining Gentoo, NetBSD, QEMU and Servo, which cite reviewer time, copyright and quality (our analysis).

Linus Torvalds. The counterexample is expert-directed use. Torvalds' October 10 kernel patches say Claude Code wrote the code, tests and first draft "under my direction," with his own sign-off on each patch and a list of ten known problems (our report). That fits the "design first, then delegate" camp, and the argument in the "AI is a tool" debate that results depend on how closely the person directs the work.

What review rules do the official tools and projects document?

SourceDocumented rule
Anthropic, Claude Code team (Oct 15, 2026 post)Human approvals by risk: none for low-risk changes once checks pass, one for medium, two for high. "An agent's approval never counts as a person's." The person who prompted an agent-written change counts as a required reviewer.
Claude Code docs, Code Review"A review never approves or blocks the pull request." "A review with no findings doesn't mean your code is error-free or secure."
GitHub docs, Copilot cloud agentIf approvals are required, "your approval of a Copilot pull request won't count"; another reviewer must approve. Actions workflows don't run on Copilot's pushes until a human approves, unless an admin uses the skip setting added March 13, 2026.
LLVM AI Tool Use Policy"There must be a human in the loop." Contributors must "read and review all LLM-generated code" before asking others, and be "able to answer questions about their work."
Linux kernel, AI coding assistants guide"AI agents MUST NOT add Signed-off-by tags." The human reviews all AI-generated code, takes "full responsibility" and adds an Assisted-by: tag.
QGIS (QEP 428, approved Oct 7, 2026)No AI-, LLM- or agent-assisted code in its main repository.

Table 2Most rules make a named human approve AI-written code and take responsibility for it; QGIS bans AI-assisted code outright. Sources: each vendor's or project's own documentation, checked October 20, 2026.

Last verified: October 20, 2026

The common thread is accountability, not comprehension. LLVM's "able to answer questions" rule comes closest to testing understanding. Most rules require a named human to approve and take responsibility, without checking what that person understood.

What are teams doing about it?

The practices in the sources above fall into four groups:

  1. Gate by risk. Anthropic sets human review by what a change touches, not who wrote it, and pairs that with fast reverts, feature flags and staged releases. Its post concedes "Some mistakes will still get through."
  2. Explain on demand. Anthropic asks: "If machines do most of the reading, how does anyone learn the code?" Its answer is that "Nobody on the team keeps a complete mental model of Claude Code in their head, and we don't think anyone needs to." When someone needs to understand a part of the code, they ask Claude to write "an explainer for exactly that slice."
  3. Make the author prove understanding. LLVM's rule is one form. A tool shown on Hacker News on October 18, Sphinx, is another: a Git hook, MIT-licensed, that asks the developer a question about what a diff does when things go wrong before a push to a protected branch. Its site says skips via sphinx yolo are logged. Commenters were split; one called it "the wrong direction" and urged developers to learn the code instead. It's an example of the approach, not a measured fix.
  4. Keep humans on design. Hacker News commenters describe owning the design and abstractions and delegating only implementation, plus small changes and joint design reviews. These are community reports.
Diagram: Anthropic requires no, one or two human approvals for low-, medium- and high-risk changes to Claude CodeDiagram: Anthropic requires no, one or two human approvals for low-, medium- and high-risk changes to Claude Code
Figure 2Anthropic sets human approvals by what a change touches, not who wrote it, and an agent's approval never counts as a person's (vendor-reported). · Illustration: 9to5AI

Unattended agents raise the stakes, since nobody may read a change before it runs (our analysis).

What the evidence supports, and what it doesn't

Supported: coding agents increase code volume faster than review capacity at the firms Chen and Stratton studied. Review became the bottleneck, and finished work didn't measurably rise. DORA's 2025 survey points the same way on stability. Developers' trust is conditional on verification.

Mixed: whether AI-written code is worse. Anthropic reports no difference in revert or removal rates for its own engineers, and a falling revert share on Claude Code. These are vendor numbers about a company with unusual tooling and token budgets, and Anthropic itself notes that AI errors may be harder to spot. PostgreSQL shows AI review can raise the quality bar, not lower it.

Not established: that developers understand less of the code they ship than before, or that this causes more incidents. No study we found measures comprehension directly. "Comprehension debt" is a useful name for a real worry, not yet a measured quantity.

Competing explanations: the Ask HN anxiety may reflect review overload (Chen and Stratton's result) or pressure to ship faster, which several commenters described, rather than inherently opaque code. Those call for different fixes: more review capacity and smaller changes, or slower delivery targets.

What's confirmed, reported and uncertain

  • Confirmed (primary documents): the Chen and Stratton results; METR's 2025 and 2026 findings and caveats; Stack Overflow's 2026 trust figures; DORA's 2025 trust and stability findings; the GitHub, Claude Code, LLVM, kernel and QGIS rules quoted above.
  • Vendor-reported: Anthropic's 90% figure, revert-share drop and no-difference result for adopters.
  • Community reports: the Ask HN practices and the reaction to Sphinx.
  • Uncertain: whether comprehension gaps lead to more incidents; whether Anthropic's results carry over to teams without its tooling; how DORA's 2026 findings, if published, compare.
Read next
Explainer · Oct 18Claude Code review, explained: how Anthropic's Claude Code team reviews AI-written code, and the /code-review, ultrareview and Code Review tools you can useRead it

About this storyBased on the sources linked below. Editorial standards

Was this useful?Report an error
The Week in AI

Get the cluster, not just the headline.

Comments
0

More on Coding agents & agents

0