cs.SEJan 23, 2026

Will It Survive? Deciphering the Fate of AI Agent-Authored Code in Open Source

Authors: Musfiqur Rahman, Mahi Begoug, Emad Shihab

Organizations: Concordia University Montréal, Canada

Abstract

AI coding agents such as GitHub Copilot, OpenAI Codex and Devin now open pull requests (PRs) that are merged into open-source projects. Industry reports suggest that AI-assisted code is revised or reverted soon after it is written, which raises the concern that agent code is "disposable". However, little is known about what happens to agent code after it is merged. Knowing how long this code survives, and why it is changed, can help maintainers decide how much review it needs. We performed a survival analysis of the 648,959 lines that 2,794 merged PRs added outside vendored and generated paths in 215 open-source repositories from the AIDev dataset, comparing agent-attributed and human code within the same repositories. Agent-attributed code is not modified sooner than human code. When each PR is weighted equally, agent-attributed lines are modified later (HR = 0.83, 95% CI [0.75, 0.93]). This difference comes from the supervised assistants, mainly Copilot and Codex (HR = 0.76). Code from Devin does not differ from human code over the whole period (HR = 0.95), but among PRs merged after mid-May 2025, code from both the supervised assistants and Devin is modified later. Without PR weighting, the difference is not statistically significant. When agent-attributed code is modified, the intent of the change is similar to that of human code (Cramer's V = 0.080). A file's size and recent changes predict whether agent-attributed code will be modified better than its code tokens do (AUC-ROC 0.78 vs. 0.70), and process features predict when it will be modified only weakly (Macro F1 of 0.31 against 0.25 for a random guess). Our findings suggest that agent code is not disposable, but whether it survives longer than human code depends on the agent, on when the code was merged and on how the comparison is computed.

Figures & tables

Explore similar work

CardsList
  1. Beyond Simpson's Paradox: A Cascade of Confounders in AI Agent Pull-Request Co-Authorship

    Jun 21, 2026Haoran Yu, Xiaochong Jiang, Lifei Liu +3Software EngineeringAI Coding Agents

  2. Agent or Human? Detecting Commits by AI Coding Agents in the Absence of Authorship Signatures

    Oct 26, 2026Kosei Horikawa, Hao Li, Yutaro Kashiwa +5Authorship AttributionAI Coding Agents