3 cumulative citations
View corpus contextAI coding assistants produce code that tends to stick: agent-authored lines are modified less often and face a 16% lower hazard of change than human-written lines, but they show modestly elevated corrective edits and greater variation across agents — implying organizational practices, not generation quality alone, shape long-term maintenance.
Citation observations
Cumulative provider counts captured on specific dates; providers are never combined.
The integration of AI agents as coding assistants into software development has raised questions about the long-term viability of AI agent-generated code. A prevailing hypothesis within the software engineering community suggests this code is "disposable", meaning it is merged quickly but discarded shortly thereafter. If true, organizations risk shifting maintenance burden from generation to post-deployment remediation. We investigate this hypothesis through survival analysis of 201 open-source projects, tracking over 200,000 code units authored by AI agents versus humans. Contrary to the disposable code narrative, agent-authored code survives significantly longer: at the line level, it exhibits a 15.8 percentage-point lower modification rate and 16% lower hazard of modification (HR = 0.842, p < 0.001). However, modification profiles differ. Agent-authored code shows modestly elevated corrective rates (26.3% vs. 23.0%), while human code shows higher adaptive rates. However, the effect sizes are small (Cramér's V = 0.116), and per-agent variation exceeds the agent-human gap. Turning to prediction, textual features can identify modification-prone code (AUC-ROC = 0.671), but predicting when modifications occur remains challenging (Macro F1 = 0.285), suggesting timing depends on external organizational dynamics. The bottleneck for agent-generated code may not be generation quality, but the organizational practices that govern its long-term evolution.
Summary
Main Finding
Contrary to the “disposable code” hypothesis, AI agent–authored code in the authors’ open-source cohort survives longer than human-authored code at the line level. Agent-authored lines had a substantially lower modification rate (≈15–16 percentage points lower) and a lower instantaneous modification risk (Cox hazard ratio = 0.842, 95% CI 0.833–0.852, p < 0.001). However, modification intent and per-agent behavior differ: agent code shows modestly higher corrective (bug-fix) and preventive edits and lower adaptive edits, effect sizes are small, and variation across agents exceeds the agent-vs-human gap. Predicting whether a line will ever be modified is moderately feasible from text (AUC-ROC ≈ 0.671), but predicting when a modification will occur is much harder (Macro F1 ≈ 0.285).
Key Points
- Scope and scale
- Final cohort: 201 open-source repositories; 5,171 PRs (3,003 agent-authored, 2,168 human-authored).
- Line-level observations: 210,184 lines tracked from PR-merge to Dec 31, 2025 (minimum observation window ≈ 5 months).
- Survival outcomes
- Line-level death (modified) rates: agent-authored ≈ 53.9% vs human-authored ≈ 69.3% (≈15.4 pp difference; log-rank p < 0.001).
- Cox model (controls for PR churn, files changed, repo stars, contributors): hazard ratio for agent lines = 0.842 (≈16% lower hazard of modification).
- File-level analyses are less reliable due to mixed authorship and showed no significant agent effect (file-level HR ≈ 1.038, p ≈ 0.052).
- Heterogeneity by agent
- Copilot-style assistants (Cursor, Claude Code, GitHub Copilot, OpenAI Codex) show substantially lower death rates (20–30 pp below human baseline).
- Devin (an autonomous agent) had a higher death rate than the human baseline.
- Modification intent (Swanson taxonomy, inferred from commit messages)
- Agent modifications: corrective 26.3% vs human 23.0%; preventive higher for agent code (7.5% vs 4.5%); adaptive lower (7.7% vs 12.8%).
- Differences are statistically significant but small in effect size (Cramér’s V ≈ 0.116); per-agent variability larger than aggregate agent-human differences.
- Prediction
- Predicting whether a line will ever be modified using bag-of-words/textual features: AUC-ROC ≈ 0.671 (≈34% above random baseline).
- Predicting timing of modification is weak (Macro F1 ≈ 0.285), suggesting temporal dynamics rely on external organizational factors not captured by static text features.
- Caveats noted by authors
- Cox proportional hazards assumption showed violations (Schoenfeld residuals), so Cox results are presented as average effects; Kaplan–Meier/log-rank used as primary evidence.
- Modification-intent mapping used keyword heuristics on commit messages — an imperfect proxy.
Data & Methods
- Source & filtering
- Data source: AIDev dataset of agent-authored PRs supplemented with sampled human-authored PRs from the same repositories.
- Filters applied to ensure “engineered” project cohort: repositories required to contain both agent and human PRs; license checks; non-archived; minimum contributor/activity thresholds; language-specific distribution filters; code-ratio outlier removal.
- Final sample: 201 repositories across multiple languages (Python, TypeScript, Go, C#, Rust, etc.).
- Operationalization of survival
- Birth = when a PR merge commit is integrated to main (t = 0).
- Death = first subsequent commit that modifies the code unit (line or file).
- Censoring = code not modified by observation end (Dec 31, 2025).
- Granularity: primary analysis at line-level (resolves mixed authorship); file-level reported for completeness.
- Statistical methods
- Nonparametric Kaplan–Meier survival estimation and log-rank tests to compare survival curves.
- Cox proportional hazards regression to estimate adjusted hazard ratios (covariates: PR churn, files changed, repo stars, contributors).
- Intent classification via keyword-based mapping of modifying commit messages to corrective / perfective / adaptive / preventive / other categories (Swanson taxonomy + preventive).
- Predictive models: bag-of-words textual features to predict (a) whether a line will be modified and (b) when (temporal buckets); evaluated with AUC-ROC and Macro F1.
- Reproducibility: authors release a replication package.
Implications for AI Economics
- Maintenance cost and productivity
- Lower modification hazard for agent-authored lines (≈16% lower) suggests potential reductions in downstream maintenance effort per line of code produced by certain AI assistants. If sustained in production settings, this could translate into measurable labor-cost savings and higher effective productivity for code-writing stages.
- However, absolute effect sizes are modest and heterogeneous by tool: tool choice matters. Firms should not assume uniform gains across all AI coding agents.
- Technical debt and risk assessment
- Longer survival does not guarantee correctness. The modestly elevated corrective share for agent edits and the possibility that developers avoid touching code they didn’t author imply nuanced risk: some AI code may persist unmodified even if imperfect, potentially accumulating latent defects (hidden technical debt).
- Organizations should combine use of AI coding tools with targeted review, testing, and monitoring to avoid shifting costs from generation to later remediation.
- Investment & sourcing decisions
- Given per-agent variation, procurement decisions should treat AI coding tools as differentiated products; empirical evaluation of agent behavior in the specific organizational context is advisable before wide-scale deployment.
- Prediction of “will-this-line-be-modified” is feasible enough (AUC ~0.67) to support triage and targeted reviews (e.g., prioritize human review for lines the model flags as modification-prone), which can improve marginal returns on review effort.
- Forecasting, budgeting, and insurance
- Limited ability to predict timing of modifications constrains precise budgeting of maintenance labor and complicates capacity planning and risk-transfer mechanisms (e.g., warranties or insurance products tied to code durability).
- Employers and vendors should therefore be cautious when modeling short-term cash flows or guarantees that hinge on quick remediation or predictable churn reductions.
- Organizational practices matter more than generation quality alone
- Authors argue the bottleneck may be governance: code review policies, CI/testing rigor, dependency management, and developer incentives likely determine long-run cost outcomes more than marginal improvements in generation quality.
- From an economics perspective, investments in process (testing, monitoring, review) may yield higher ROI than marginally better model outputs.
- Policy and labor-market effects
- If copilot-style assistants consistently reduce modification rates without increasing latent defects, they could reduce maintenance labor demand per unit of code, affecting billing models (e.g., fewer billable maintenance hours) and potentially shifting developer time towards higher-level tasks (design, architecture, product).
- Conversely, the uncertainty about timing and the heterogeneity across agents suggests that labor displacement risks are uneven and contingent on tool choice and internal processes.
- Research & managerial recommendations
- Firms should A/B test specific agents in their own codebases and instrument not only generation correctness but downstream survival/modification outcomes.
- Cost-benefit analyses of AI tooling should include longevity metrics (survival) and modification intent breakdowns, not just generation-time correctness.
- There is value in tooling that flags modification-prone generated code to prioritize review and automated testing.
Limitations to keep in mind when applying these implications: the study focuses on open-source repositories filtered for comparability and has a limited observation window (PR inclusion cutoff Aug 1, 2025; observation to Dec 31, 2025), intent inference relies on commit-message heuristics, and Cox model assumptions were imperfectly met — all of which temper generalizability to every enterprise context.
Assessment
Claims (9)
| Claim | Direction | Outcome | Confidence & Evidence | Details |
|---|---|---|---|---|
| We analyze 201 open-source projects, tracking over 200,000 code units authored by AI agents versus humans. Organizational Efficiency | null_result | dataset scope (number of projects and code units analyzed) |
Reading fidelity
high
Study strength
high
|
n=201
|
| Contrary to the disposable code narrative, agent-authored code survives significantly longer: at the line level, it exhibits a 15.8 percentage-point lower modification rate. Organizational Efficiency | positive | line-level modification rate |
Reading fidelity
high
Study strength
medium
|
n=200000
15.8 percentage-point lower modification rate
|
| Agent-authored code exhibits a 16% lower hazard of modification (HR = 0.842, p < 0.001). Organizational Efficiency | positive | hazard (instantaneous risk) of code modification |
Reading fidelity
high
Study strength
medium
|
n=200000
HR = 0.842, p < 0.001 (16% lower hazard)
|
| Agent-authored code shows modestly elevated corrective rates (26.3% vs. 23.0%), while human code shows higher adaptive rates. Error Rate | mixed | proportion of modifications classified as corrective (versus adaptive) |
Reading fidelity
high
Study strength
medium
|
26.3% vs. 23.0%
|
| The effect sizes for differences in modification-type profiles are small (Cramér's V = 0.116). Organizational Efficiency | null_result | strength of association between author type and modification-type distribution |
Reading fidelity
high
Study strength
medium
|
Cramér's V = 0.116
|
| Per-agent variation exceeds the agent-human gap. Organizational Efficiency | mixed | variance in modification outcomes across individual agents versus between agent and human groups |
Reading fidelity
high
Study strength
medium
|
not reported
|
| Textual features can identify modification-prone code (AUC-ROC = 0.671). Organizational Efficiency | positive | classification performance for identifying modification-prone code (AUC-ROC) |
Reading fidelity
high
Study strength
medium
|
AUC-ROC = 0.671
|
| Predicting when modifications occur remains challenging (Macro F1 = 0.285), suggesting timing depends on external organizational dynamics. Organizational Efficiency | null_result | temporal prediction performance for time-to-modification (Macro F1) |
Reading fidelity
high
Study strength
medium
|
Macro F1 = 0.285
|
| The bottleneck for agent-generated code may not be generation quality, but the organizational practices that govern its long-term evolution. Governance And Regulation | mixed | primary limiting factor for long-term viability of agent-generated code (generation quality vs organizational practices) |
Reading fidelity
high
Study strength
speculative
|
not reported
|