Why Are AI Agent Involved Pull Requests (Fix-Related) Remain Unmerged? An Empirical Study
This empirical study analyzes over 8,000 fix-related pull requests from five AI coding agents to identify that test case failures and duplicate issue resolutions are the primary barriers to merging, while build failures are rare, thereby highlighting key limitations in current AI agents and directions for improving human-AI collaboration in software maintenance.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a software project as a giant, bustling construction site. The "maintainers" are the site managers who decide which blueprints get built and which get thrown in the trash. Recently, they've started hiring AI agents (like robotic assistants) to draw up repair plans (called "Pull Requests" or PRs) for fixing broken parts of the building.
This paper is like a detective report asking: "How often do these robot assistants actually get their repair plans approved, and when they don't, why?"
Here is the breakdown of their findings, using simple analogies:
1. The Big Picture: The Success Rate
The researchers looked at over 8,000 repair plans submitted by five different types of AI robots (OpenAI Codex, GitHub Copilot, Devin, Cursor, and Claude Code).
- The Good News: About 65% of the time, the site managers said, "Yes, build this!" and merged the fix. The robots are doing a decent job.
- The Bad News: About 26% of the time, the managers said, "No," and closed the plan without building it. Another 9% are still sitting in the waiting room, undecided.
- The Robot Differences: Not all robots are created equal.
- OpenAI Codex is the star student: It got approved 81% of the time.
- Devin struggled the most: It only got approved 43% of the time, meaning more than half of its repair plans were rejected.
2. The "Why": Why Do Plans Get Rejected?
The researchers dug deep into the 326 rejected plans to find out exactly why they failed. They found 12 different reasons, which they grouped into three main categories:
A. The "Wrong Fix" Problems (Technical Issues)
Sometimes the robot tries to fix a leak, but it actually breaks the pipe.
- Test Failures (The most common technical reason): The robot's fix passed the robot's own logic, but it failed the project's strict safety tests. It's like a chef cooking a meal that looks great but tastes terrible when the health inspector (the test suite) tries it.
- Incomplete or Wrong Fixes: The robot guessed the problem but solved the wrong thing, or only fixed half of it.
- Build/Deploy Failures: Rarely, the fix was so broken that the building couldn't even be assembled (it wouldn't compile or run).
B. The "Bad Timing" Problems (Process Issues)
Sometimes the fix is actually good, but the timing is off.
- Someone Else Did It First (The #1 Reason for Rejection): This happened in 22% of cases. The robot was working hard to fix a broken window, but a human (or another robot) had already fixed it five minutes ago. The robot's plan was rejected simply because it was redundant.
- Inactivity: The robot submitted a plan, but then went silent. The managers got bored waiting for a reply and closed the ticket.
- Low Priority: The issue the robot tried to fix wasn't actually important anymore, or the project managers decided to ignore it.
C. The "Communication Breakdown" Problems
- No Review: The robot asked for a review, but no human manager ever looked at it.
- Silent Rejection: The plan was closed without any explanation, leaving the robot (and the researchers) in the dark about why it failed.
3. The "Speed" Factor
The researchers also measured how long it took for a plan to get approved.
- Fast Merges: Many good fixes were approved very quickly.
- Slow Merges: Some took a long time. Interestingly, the "star student" (OpenAI Codex) had the most consistent and fastest approval times, while others had much more unpredictable wait times.
The Bottom Line
The paper concludes that while AI robots are getting better at writing code, writing code isn't enough.
To get a repair plan approved in the real world, the robot needs to:
- Pass the strict safety tests (not just look good).
- Not duplicate work that humans or other robots have already done.
- Stay engaged in the conversation with the human managers.
Currently, the biggest hurdles aren't that the robots can't write code; it's that they often fail the tests or get beaten to the punch by other people fixing the same problem. The study suggests that for AI to truly become a reliable "virtual teammate," it needs to get better at understanding the context of the project and the timing of the workflow, not just the code itself.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.