DEV Community

Cover image for AI Coding Agents Raised Code Output 30% and Slowed PR Reviews 49%: How to Fix the Queue
Sean Kwon
Sean Kwon

Posted on Edited on

AI Coding Agents Raised Code Output 30% and Slowed PR Reviews 49%: How to Fix the Queue

Two large-scale 2026 empirical studies reached the same answer on AI coding agents: drafting code got dramatically faster, while shipping finished software barely moved because human code review became the choke point. In a Harvard working paper covering over 700 firms, AI coding agents raised lines of code by 30% and pull requests by 23%, yet average PR submission-to-merge time jumped 49%.

What the two multi-tool studies actually measured

Both papers track real production engineering telemetry across multiple coding tools instead of synthetic benchmark tasks.

Harvard economists Fiona Chen and James Stratton (author research page, reported in detail by Ars Technica) analyzed 300 million work events across more than 700,000 employees at over 700 software companies through March 2026, later expanding the dataset to 445M work events across 720,542 workers at 655 firms. Across adopting companies, AI coding agents lifted lines of code by 30%, commits by 20%, and pull requests by 23%. Resolution rates for Jira issues and epics showed no statistically significant increase.

A separate NBER working paper (w35275) by Mert Demirer, Leon Musolff, and Liyuan Yang tracked more than 500,000 GitHub developers with AI usage telemetry. Cumulative commits rose 30% for autocomplete, 180% for interactive coding agents, and 240% for autonomous coding agents. Moving up the delivery funnel, that 240% commit gain dropped to 80% for projects and fell all the way to 30% for actual releases.

Empirical dataset Code generation gain Shipped output impact Measured bottleneck
Harvard / Jellyfish (over 700 firms, 700,000+ workers; expanded to 445M events across 655 firms) +30% lines of code, +20% commits, +23% pull requests No statistically significant rise in Jira issues or epics resolved +49% PR submission-to-merge time, +35% comments per PR, change requests nearly doubled
NBER w35275 (500,000+ GitHub developers) +30% commits (autocomplete), +180% (interactive), +240% (autonomous agents) +240% commit surge drops to +80% projects and +30% actual releases 0.23 elasticity of substitution between AI and human effort

The NBER authors tie this drop to the weak-link effect: an estimated elasticity of substitution of 0.23 between AI and human effort means faster drafting cannot substitute for human verification and review.

Why AI code reviewers did not clear the backlog

Teams already tried throwing automated review bots at the queue. In the Harvard dataset, 80% of measured firms had adopted some form of AI code review by March 2026. Even with broad adoption, AI generated only 23.3% of review comments across 10.8% of pull requests. Meanwhile, the share of human workers doing code reviews still climbed 14%.

The numbers point to two stacked failure modes. First, agents push 23% more pull requests into a fixed pool of senior maintainers who understand the codebase. Second, first-pass draft quality drops, so reviewers spend more cycles catching edge cases and sending work back, driving a 35% jump in comments per PR and nearly doubling the share of pull requests with changes requested.

Fixing the queue takes process gates before a human ever gets notified, not another bot leaving style comments after a reviewer is already paged.

Gate 1: Audit merge tail latency and change-request loops in your own repo

Before changing team rules, measure both median and 90th-percentile merge hours alongside review churn on your own merged pull requests. The GitHub CLI gh pr list manual exposes createdAt, mergedAt, reviews, and reviewDecision directly as JSON.

Pipe the last 50 merged PRs into a short Python check to measure median merge time, 90th-percentile tail wait, median review events, and how often drafts bounce back with CHANGES_REQUESTED (GitHub Pull Request Reviews REST docs):

gh pr list --state merged --limit 50 \
  --json number,createdAt,mergedAt,reviews,reviewDecision \
  | python3 -c '
import json, statistics, sys
from datetime import datetime

prs = json.load(sys.stdin)
merge_hours, rev_counts = [], []
changes_requested = 0

for pr in prs:
    created = datetime.fromisoformat(pr["createdAt"].replace("Z", "+00:00"))
    merged = datetime.fromisoformat(pr["mergedAt"].replace("Z", "+00:00"))
    merge_hours.append((merged - created).total_seconds() / 3600)
    revs = pr.get("reviews") or []
    rev_counts.append(len(revs))
    if any(r.get("state") == "CHANGES_REQUESTED" for r in revs):
        changes_requested += 1

merge_hours.sort()
p90 = merge_hours[int(0.9 * (len(merge_hours) - 1))]
print(f"Merged PRs analyzed: {len(prs)}")
print(f"Median hours to merge: {statistics.median(merge_hours):.1f}h")
print(f"90th-percentile hours to merge: {p90:.1f}h")
print(f"Median review events per PR: {statistics.median(rev_counts):.1f}")
print(f"PRs with CHANGES_REQUESTED: {changes_requested}/{len(prs)} ({100 * changes_requested / max(len(prs), 1):.1f}%)")
'
Enter fullscreen mode Exit fullscreen mode

Running that exact command against the last 50 merged pull requests on modelcontextprotocol/python-sdk produces:

Merged PRs analyzed: 50
Median hours to merge: 0.4h
90th-percentile hours to merge: 44.1h
Median review events per PR: 2.0
PRs with CHANGES_REQUESTED: 0/50 (0.0%)
Enter fullscreen mode Exit fullscreen mode

Looking only at the 0.4h median would suggest there is no queue at all, while the 44.1h 90th-percentile merge time reveals where harder PRs actually stall. Running the same snapshot weekly before and after changing PR rules shows whether your backlog sits in queue wait or in repeated revision rounds.

Gate 2: Force every agent PR into Draft mode so CODEOWNERS stay quiet until CI passes

Most review queues clog because an agent finishes a loop and opens a normal pull request immediately, paging every owner before tests finish or the author inspects the diff. Under GitHub's CODEOWNERS rules, code owners are not automatically requested to review draft pull requests. When you mark a draft pull request as ready for review, code owners are automatically notified.

Make Draft mode the default in your agent prompt instructions and shell workflow using gh pr create --draft and gh pr ready:

# 1. Agent opens every PR as a draft so CODEOWNERS are not paged on broken runs
gh pr create --draft --fill

# 2. Only after local tests, CI checks, and author diff inspection pass:
gh pr ready
Enter fullscreen mode Exit fullscreen mode

That single change keeps raw agent output out of senior engineers' notification queues while the author trims dead code, verifies edge cases, and fixes failing checks.

Gate 3: Block ready-for-review PRs that lack a reproducible verification block

Draft mode protects reviewer attention during CI, while a pre-review workflow stops half-baked drafts from triggering change-request loops after they turn ready. Using GitHub Actions pull_request triggers for opened, synchronize, and ready_for_review, require every non-draft PR to pass tests and include a non-empty verification section describing the exact command run to prove behavior:

name: PR Review Readiness Gate

on:
  pull_request:
    types: [opened, synchronize, ready_for_review]

jobs:
  verify-before-human-review:
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check PR verification block
        env:
          pr_body: ${{ github.event.pull_request.body }}
        run: |
          python3 - << 'PY'
          import os, re, sys
          body = os.environ.get("pr_body", "")
          match = re.search(r"(?is)##\s+Verification\s*\n(.+)", body)
          if not match or len(match.group(1).strip()) < 25:
              print("Missing ## Verification section with test command and observed result.")
              sys.exit(1)
          print("Verification block present.")
          PY
      - name: Run full test suite
        run: npm test
Enter fullscreen mode Exit fullscreen mode

Because the job skips draft pull requests (github.event.pull_request.draft == false) and fires automatically on ready_for_review, authors and agents can iterate freely in draft while guaranteeing that any PR reaching a human reviewer has both green tests and a written verification trace.

Keep review capacity ahead of drafting speed

Faster code generation only raises shipped output when review capacity and draft verification scale with it. Measure your current tail merge latency and CHANGES_REQUESTED rate with gh pr list, default agent PRs to --draft so CODEOWNERS are only notified on verified work, and run a ready_for_review readiness gate before human reviewers open the diff.

Where has the review queue slowed down most on your repositories since adopting coding agents, and which workflow change actually cut back the revision loops?

Top comments (9)

Collapse
 
userxnom profile image
Abdullah Naseer •

The median vs p90 split is the part that reframes it for me — 0.4 hours median against 44.1 at the 90th percentile means the queue looks fine on average while a real chunk of work quietly stalls. Draft mode as the default feels like the highest-leverage gate here: it stops half-baked agent output from paging reviewers before CI has even had a say. I also like that the verification block is a process rule, not another bot — it makes the agent prove the work instead of asking a human to discover it wasn't proven.

Collapse
 
seanjhkwon profile image
Sean Kwon •

That p90 tail caught me off guard too when I pulled those 50 merged PRs. Looking at the median alone makes the queue look fine right up until two or three large agent PRs stall and hold up a release. Keeping agent PRs in draft until CI passes and the verification block is filled in has been the simplest way to protect reviewer attention without maintaining yet another review bot. Curious what gate ended up sticking on your side.

Collapse
 
userxnom profile image
Abdullah Naseer •

Honestly, nothing has stuck for me in the team sense — I'm solo, so there's no review queue to gate. Draft mode is the one I'd steal first if I had reviewers: it stops half-baked agent output from paging people before CI has had a say. On my own work, the equivalent is just not treating agent output as done until I've read it through myself.

Thread Thread
 
seanjhkwon profile image
Sean Kwon •

That solo boundary makes a lot of sense. Even without a second reviewer, forcing a quick self-read pass before treating agent output as done catches most of the silent drift and half-wired edge cases. Draft PRs just formalize that same pause once more people share the repo.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

Code output up 30% and reviews down 49% is a queue problem wearing a productivity costume. The bottleneck moved to review, so that is where the fix belongs.

Collapse
 
seanjhkwon profile image
Sean Kwon •

Line counts and raw PR volume hide that queue cost right up until review latency jumps and merges stall. Tightening intake with smaller diffs, required CI checks, and an explicit verification summary moves real shipping speed much faster than speeding up code generation again.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

Smaller diffs plus an explicit verification summary is the combination that actually moves review time. Raw output was never the bottleneck.

Collapse
 
iictp profile image
IICTP •

The median-versus-p90 split is the part I'd steal first — a 0.4-hour median hides a 44.1-hour tail, and that tail is where the queue actually lives. The Draft-mode gate is a neat fix too, since it keeps half-baked agent output out of reviewers' queues without adding another bot. Have you seen teams run that merge-time audit as a regular check, or does it usually stay a one-off exercise?

Collapse
 
jacksonxly profile image
Jackson Ly •

Ran it on my own repo, where agent sessions open almost every PR (gh 2.46.0, last 50 merged): median 1.8h, p90 16.7h, median review events 0.0, CHANGES_REQUESTED 0/50. The reviews run inside those sessions and the fixes go up as plain pushes, so none of the 50 has a single review object. Counting commits authored after each PR was opened, with gh pr view N --json commits, gives a different picture: 33 of the 50 got more commits after opening, 118 of them not counting merges, 89 starting with test or fix.