TL;DR
AI coding agents are increasingly contributing performance-improving pull requests (PRs) to open-source projects, but maintainers often merge these fixes without verifying the claimed speedups. This study reveals that a repository's prior history with an agent is a stronger predictor of acceptance than the actual quality or evidence provided in the fix, and many "merged" performance improvements fail to deliver real-world gains or even introduce regressions.
What Problem Does This Paper Address?
As AI coding agents like Devin, GitHub Copilot, and Claude Code become more autonomous, they are moving beyond simple bug fixes to complex tasks like performance optimization. However, performance is notoriously difficult to measure reliably; it requires rigorous benchmarking, controlled environments, and repeated trials to distinguish a real improvement from system noise.
The authors set out to answer a critical question: How do human maintainers actually handle these AI-generated performance claims? Do they verify the numbers? Does the "AI-ness" of the contributor affect the decision? And perhaps most importantly, do these merged fixes actually make the software faster?
Methods
The researchers conducted a large-scale empirical study using a multi-stage pipeline to identify and analyze performance fixes:
- Filtering: They started with 71,677 agent-generated PRs from the AIDev v4 dataset. They used Heuristic Linguistic Patterns (HLPs) to narrow these down to candidate performance fixes.
- Coding: A combination of LLMs (Claude Sonnet, GPT-4) and manual author review was used to code 1,262 fixes across 582 repositories. They categorized the root causes of inefficiencies, the types of resolutions applied, and the scope of the changes.
- Re-execution: To verify the claims, the authors performed a "pilot" re-execution of 23 rejected fixes and a more rigorous re-execution of 30 merged fixes. They built the software at both the "base" (before fix) and "head" (after fix) commits and measured performance across different workload sizes.
- Comparative Analysis: They compared agent PRs to human-written PRs in the same repositories to identify an "acceptance gap."
Datasets
- AIDev v4: A massive dataset of 2.7 million PRs opened by six different coding agents (Copilot, Codex, Devin, Cursor, Claude Code, and Jules).
- Consensus Set: A curated subset of 1,262 performance-related PRs identified and verified by the authors.
Key Insights and Ideas
- Reputation Over Reality: The strongest predictor of whether a fix is merged isn't the presence of a benchmark or a clear description; it's the repository's track record with that specific agent. If a repo has merged agent PRs before, it's much more likely to merge the next one (acceptance jumps from ~30% to 70%+).
- The "Delete" Signal: Maintainers seem to favor fixes that simplify code. PRs that delete a larger share of the lines they change (a high "deleted-line share") are significantly more likely to be merged.
- Architectural Reach, Shallow Depth: Agents are surprisingly good at "architectural-level" fixes—changes that span multiple files to implement a single mechanism (like a new shared cache). However, the edits within each file remain shallow, typically touching only one or two functions.
- The Measurement Gap: Maintainers rarely ask for or perform their own measurements. 61% of rejections provide no reason at all, and for merged fixes, the "evidence" provided by the agent (like a toy test case) often wouldn't actually distinguish a real improvement from a regression.
Key Results
- Merge Rates: 57% of closed agent performance fixes are merged. However, this varies wildly by agent: Codex and Claude Code enjoy ~73% acceptance, while Devin sits at 30%.
- Failed Claims: In the re-execution of 23 rejected fixes that claimed a speedup, only 6 actually held up. In many cases, the "fix" actually made the code slower.
- Merged Regressions: Of 30 merged fixes re-executed, 9 showed no significant gain or were outright regressions. Furthermore, 14 of these fixes changed software behavior on inputs that the agent's own tests never reached.
- Human vs. Agent: Agent PRs are merged significantly less often than human PRs (41% vs 80% in a paired sample). The gap is widest at the "approval" stage; once a maintainer actually approves an agent PR, it is merged at nearly the same rate as a human one.
Limitations and Future Work
The authors acknowledge several limitations:
- Sample Size: The re-execution was limited to 53 total fixes due to the high manual effort required to build and benchmark diverse real-world projects.
- Observational Data: The study identifies associations (like the link between code deletion and merging) but cannot prove causation.
- LLM Bias: Using Claude Opus to judge the quality of other agents' PRs (including Claude Code) introduces a potential vendor bias.
Future Work: The authors suggest controlled studies where the same optimization is submitted in different "shapes" (e.g., one that adds code vs. one that replaces it) to see how maintainer behavior changes. They also call for better automated benchmarking tools that maintainers can easily run to verify AI claims during code review.
Summary updated