Time to first review is the gap between a pull request becoming ready for review and the first substantive human review on it, and you can only compare it before and after AI coding agents if your team writes down exactly where that clock starts and stops.
Most teams skip that step. One dashboard starts the clock at PR creation, another at the first review request, a third counts a bot comment as a review. Then the board asks whether the AI bet is paying off, and the answer rests on a number nobody defined.
This post proposes a team measurement contract you can adopt as written or edit. It covers start and stop events, exclusions, censoring, business hours, a worked hypothetical timeline and a small export schema you can build from GitHub or Bitbucket data. It doesn't claim that AI caused any change. It makes sure that when you compare two periods, both were measured with the same clock.
Why time to first review needs a written definition before any AI comparison
Every tool and every engineer defaults to a different clock, and a before and after comparison is only valid if the clock is identical on both sides.
Three defaults are common. Start at PR opened. Start at first reviewer assigned. Start at ready for review. On a team where agents open PRs as drafts and humans mark them ready hours later, these three starts can differ by a working day. Switch from one to another midway through the comparison and you will "find" an improvement or a regression that is pure bookkeeping.
The stop event has the same problem. If a linter bot or an AI review comment counts as the first review, your number drops the day you install it, and human response time hasn't changed at all.
So write the contract down. One page, agreed by the leads, versioned. When the definition changes, start a new series instead of splicing two together.
For the wider picture of why review queues grow when agents write more code, see Everyone Got Faster and Nothing Shipped Sooner. For the baseline and cost side, Measuring AI Coding Tool ROI covers it. This post is only about the clock.
Which review delay metrics matter once coding agents open PRs?
Track time to first substantive human review, reported as a median and a 90th percentile, next to the share of PRs still unreviewed. Agents raise PR volume, so queue time is where delay shows up first. The number is only trustworthy once the start and stop events are written down, because a bot comment or a draft state can quietly shorten or lengthen the figure and make two periods incomparable.
The measurement contract: start the clock at ready for review, stop at the first substantive human review
The proposed contract is simple: the clock starts when a PR is first ready for review and stops at the first substantive review by a human who is not the PR author.
Start event. The moment the PR is open and not a draft. If it opens non-draft, that is its creation time. If it opens as a draft, it is the time the draft was marked ready. Use ready_for_review where it exists and PR creation time where it doesn't.
Stop event. The first of these, by a human other than the author: a submitted review (approve, request changes or comment-type review with a body), or an inline review comment on the diff. A reaction emoji or a bare "looking" comment doesn't count. Write down what "substantive" means for your team, even if it is only "a submitted review or a diff comment from a human account".
Why not first review request? Because assignment can happen automatically at creation through code owners, and the number then measures your routing rules rather than your reviewers.
Why not first comment of any kind? Because bots comment within seconds and humans within hours. Mixing them hides exactly the delay you are trying to see.
For context on what good looks like, Google's engineering guidance asks reviewers to respond within one business day at the latest, and ideally sooner (Google Engineering Practices). That is a first-response target, not a completion target, which is the same shape as this metric.
Edge cases to decide up front: drafts, bot comments, reopened PRs and business hours versus elapsed time
Decide four edge cases in advance. Each one moves the number, and each one is a place where two analysts will quietly disagree.
Drafts. Time spent as a draft is not review wait. Exclude it from the clock and report draft duration as its own figure. If a PR goes ready, back to draft, then ready again before any review, restart the clock at the latest ready event. Report how often that happens. A high rate is a signal about PR readiness, not reviewer speed.
Bot comments. Exclude bot and automation accounts from the stop event: CI bots, dependency updaters, coverage reporters, and AI review tools. Keep them in the export with a flag so you can show them separately. If your team wants AI review as a first pass, measure it as its own metric (time to first automated review) and keep the human clock human.
Reopened PRs. A PR closed and reopened keeps its original first-review time if a human review already happened. If it was closed unreviewed and reopened, treat the reopen as a fresh start event. Say which rule you chose and apply it everywhere.
Business hours versus elapsed time. Pick one as the headline and publish the other beside it. Elapsed time is easy to compute and honest about what an author experiences. Business hours remove nights and weekends and are fairer across time zones. If your team spans several time zones, define the working calendar once (for example, Monday to Friday, 09:00 to 18:00 in a named zone) and never change it mid-comparison. A PR opened Friday at 17:30 and reviewed Monday at 09:30 is 64 elapsed hours and one working hour. Both are true. Only one belongs in the headline, and the contract should say which.
Unreviewed open PRs and merged-unreviewed PRs: censoring and separate reporting
A PR with no review yet must not be dropped from the data, because dropping it makes the metric look better exactly when review is slowest.
This is censoring. A PR open for nine days with no review has a time to first review of "at least nine days", not "unknown". If you compute your median only over PRs that already got reviewed, a bad week looks fine until the stragglers finally get looked at, and then it looks like a sudden collapse. Neither is real.
Handle it with three rules:
Open and unreviewed at the end of the period. Keep them in the dataset with the stop time empty and the observation end as the censor time. Report a count and the oldest age alongside the median.
Merged without a human review. These have no stop event at all. Don't assign them a time of zero and don't silently exclude them. Report them as a separate line: count, share of merged PRs and size distribution. A rising share of merged-unreviewed PRs can make median time to first review look better while review coverage gets worse.
Closed unmerged and unreviewed. Report separately as abandoned. They are neither fast nor slow.
The headline then reads: median and 90th percentile time to first review on reviewed PRs, plus the counts of open-unreviewed, merged-unreviewed and abandoned. Four numbers. Leave off the second half and you've made a flattering chart.
A worked example: one hypothetical PR timeline, event by event
Here is one invented PR, walked through under the contract. It is a hypothetical, not real data. Assume the working calendar is Monday to Friday, 09:00 to 18:00, and the headline is business hours.
| Time | Event | Counts toward clock? |
|---|---|---|
| Tue 10:00 | Coding agent opens PR as draft, linked to a ticket | No, draft |
| Tue 10:02 | CI bot posts a coverage comment | No, bot |
| Tue 10:05 | AI review tool leaves three comments | No, automation |
| Tue 14:30 | Author pushes fixes, marks ready for review (ready_for_review) |
Clock starts |
| Tue 14:31 | Reviewer requested via code owners | No change |
| Tue 17:45 | Teammate adds a thumbs-up reaction | No, not substantive |
| Wed 09:20 | Reviewer submits review with two diff comments | Clock stops |
| Wed 15:00 | Author pushes changes, second review round | Out of scope |
| Thu 11:00 | PR approved and merged | Out of scope |
Business hours from start to stop: Tuesday 14:30 to 18:00 is 3.5 hours, plus Wednesday 09:00 to 09:20, which is 0.33 hours, for a total of about 3.8 business hours.
Elapsed time: Tuesday 14:30 to Wednesday 09:20 is 18 hours 50 minutes.
Draft time: 4 hours 30 minutes, reported separately.
Now look at what a sloppy clock would have said. Start at creation and stop at the first comment of any kind: two minutes, fantastic. Start at creation and stop at the first human review: about 23 elapsed hours, which mostly measures the draft. Same PR, three numbers. The contract picks one and keeps it.
A small export schema you can build from your Git host data
You don't need a warehouse project to apply this contract. One flat table per PR and one per review event is enough, populated from the GitHub or Bitbucket API.
Suggested PR-level fields:
pr_id,repo,author_login,author_is_botcreated_at,first_ready_at,last_ready_atdraft_seconds(total time spent as draft before the final ready event)first_human_review_at(empty if none yet)first_human_review_type(review, diff_comment)first_bot_activity_atmerged_at,closed_at,reopened_countlines_added,lines_deleted,files_changedagent_assisted(true, false or unknown, with how you determined it)observation_end_at(the cut-off used for censoring)
Suggested event-level fields, one row per review activity:
pr_id,event_at,actor_login,actor_is_bot,event_type,is_substantive
Derived columns, computed outside the raw export so the definition lives in one place:
ttfr_elapsed_secondsandttfr_business_seconds, empty whenfirst_human_review_atis emptystatus: reviewed, open_unreviewed, merged_unreviewed, abandonedsize_bucket: for example XS, S, M, L from lines changed
Two cautions. First, the agent_assisted flag is the hardest field. Decide how you will tag it (branch naming, author account, PR label, commit trailer) and record the method, since an unreliable flag undermines every cohort split later. Second, keep raw events and derived values separate, so changing the contract version means recomputing columns, not re-pulling data.
This is a suggested schema for your own export, not a description of any product's data model.
How do I get review wait time for Copilot agent pull requests?
Export PR events from your Git host, including opened, ready for review, review submitted and merged timestamps, plus the author login. Mark agent-authored PRs by the bot account or a label, then compute ready-for-review to first human review for that cohort. Exclude the agent's own comments from the stop event. Otherwise the wait looks near zero and tells you nothing about human reviewers.
Comparable cohorts and PR size: how to compare periods without claiming cause
To compare two periods fairly, compare like with like on PR size, repo, team and calendar, and describe the result as a difference, not as an effect of AI.
PR size is the biggest confounder. If agents produce larger or more numerous PRs, review latency can rise for reasons unrelated to reviewer behaviour: bigger diffs wait longer, and more PRs compete for the same reviewers. A raw before and after median can mislead in either direction.
So cut the data before you read it:
Bucket by size. Compare time to first review within XS, S, M and L separately. If the mix shifted toward larger PRs, say so.
Split by repo or team where reviewer pools differ.
Match calendars. Compare a period with holidays against one without and you are measuring leave, not review. Compare like weeks.
Keep the cohort split honest. Agent-assisted versus not is only meaningful if your tagging method is stable across the whole window.
Watch volume. Report PRs per reviewer per week next to latency. Rising volume with flat latency and rising latency with flat volume are different stories.
Then write the sentence carefully. "Median time to first review on S-sized PRs was 6.2 business hours in March and 9.1 in June, with PR volume per reviewer up 30%" is a finding. "AI slowed our reviews" is a claim you haven't earned. Teams also change at the same time as tooling: new hires, a reorg, a release crunch. The data can show that something moved. It can't show why.
Do AI-generated pull requests create a review bottleneck?
They can, but confirm it in your own data rather than assume it. More agent output means more PRs competing for the same reviewers, which lengthens waits. Check three things: PR count per reviewer, PR size, and first-review time over matching periods. If waits rise while reviewer capacity is flat, the bottleneck is real. Describe it as an association, not proof that agents caused it.
How to report the number, and where to go next (baseline, ROI and review queue pressure)
Report time to first review as a small block, not a single figure: median, 90th percentile, the three exclusion counts, the contract version and the size mix.
A reporting template that survives a leadership meeting:
Headline: median business hours to first human review, reviewed PRs only, with the 90th percentile beside it.
Coverage: count and share of open-unreviewed, merged-unreviewed and abandoned PRs.
Context: PR volume per reviewer, and the size mix.
Provenance: contract version, working calendar, how agent-assisted PRs were tagged, observation cut-off.
Show the median and the tail. Medians hide the PR that sat for a week. The 90th percentile and the oldest open PR expose it. Show it to the team before the board, since engineers will spot a definition problem faster than anyone.
From here, two existing reads pick up where this one stops. Measuring AI Coding Tool ROI covers establishing a baseline and tying adoption to outcomes. Everyone Got Faster and Nothing Shipped Sooner covers why review queues build up when code gets cheaper to write and what to measure alongside first review.
If you'd rather not maintain scripts for this yourself, Coderbuds is engineering intelligence for software teams. It pulls delivery and DORA metrics from GitHub or Bitbucket. Whichever way you build it, settle the definition first.
Where does review time sit among DORA metrics for AI-generated code?
DORA's core measures are lead time for changes, deployment frequency, change failure rate and time to restore. Review latency isn't one of them, but it sits inside lead time, so it explains much of the movement there. Report first-review time next to lead time and deploy frequency, and keep AI-authored and human-authored PRs as separate cohorts so you can see whether agents are shifting the review queue.
Can I trust a review time number from an engineering metrics tool?
Trust it only if you can read its definition. Ask which event starts the clock, which stops it, whether bot reviews count, and how drafts, reopened PRs and unreviewed PRs are handled. Any tool produces a different number under different rules. Reproduce a few PRs by hand from your own GitHub or Bitbucket data and confirm the tool matches before you compare periods.
Write the contract this week, then start the 30-day trial to see your own numbers
A time to first review figure is only as trustworthy as the definition behind it, and the definition is a decision, not a discovery. Pick the start event, the stop event, the exclusions and the working calendar, write them down, and freeze them for the comparison window. Then your before and after periods answer the question you actually have. To see delivery and DORA metrics from your own GitHub or Bitbucket data without building the export yourself, start the 30-day free trial at Coderbuds. No card needed.