Documentation Drift in AI-Generated Pull Requests
- Source
- arxiv.org
- Author
- Will De Michele, Kla Tantithamthavorn
- Date

Context
This APSEC 2026 early-research paper asks a simple question of 29,669 pull requests written by AI coding agents across 2,585 repositories in the AIDev dataset: when an changes code, does it also update documentation in the same PR? Most of the time it does not. The authors find 63.2% of these PRs touch code without any documentation , rising to 77.5% for refactors and 55.2% for features. The agents covered are Claude Code, Cursor, Devin, GitHub Copilot and OpenAI Codex, though Codex accounts for about two-thirds of the PRs.
The more interesting result is about consequences, and it hinges on a statistical trap. Compared PR by PR, documented changes look worse, because they are followed by more later fixes. But the full paper shows documented PRs are 3.9 times larger, so much of that gap reflects more code exposed to future fixes. When the authors switch the unit of analysis to individual changed code files, the relationship flips: undocumented files are followed by a fix to the same file 8.6 to 11.7% more often, in relative terms, over 30 to 90 days, a gap of 1.2 to 1.7 percentage points. Drift also compounds, since files changed without documentation are later re-documented at roughly half the rate of those changed with it, 24% versus 48% within 90 days.
The authors are explicit about what this does not show. Missing documentation is a proxy that flags an absent update, not a verified mismatch between docs and code; any documentation file counts, including an unrelated changelog edit, while docstrings and inline comments are invisible. The fix link is temporal rather than causal and does not control for task type, agent or repository habits, and there is no human baseline, so 63.2% cannot be judged high or low against how people work. The faster merge times for documented PRs are also flagged as weak evidence because merging in this dataset is largely automated.
- Across 29,669 AI-generated pull requests in 2,585 repositories, the authors report that 63.2% changed code without updating any documentation file, rising from 55.2% for features to 77.5% for refactors.
- Undocumented code files were followed by a fix to the same file 8.6-11.7% more often over 30-90 days. A naive PR-level comparison shows the reverse, because documented PRs are 3.9x larger; controlling for size flips the result.
- Documentation debt compounds, per the abstract: within 90 days, files changed without documentation were later re-documented at about half the rate of documented ones (24% vs 48%).
articleNot All Agents Are Equal: Code Quality and Post-Merge Maintenance Across Five Autonomous Coding Agents in the WildObada Kraishan
articleWho Finishes the Job? A Study of Follow-Up Fixes and Commit Authorship on AI Coding Agent Pull RequestsWannita Takerngsaksiri, Nhat Duong, Scott Barnett
articleWhat Open-Source Projects Tell Their Coding Agents: A Census of AGENTS.md and CLAUDE.mdPawel Zarzycki