Engineering notesMagnus Ekdahl

Fix the process around coding agents before adding more of them

Running reviews and integration tests together, instead of one after another, cut time until a change is ready for team review by 15–22%.

Many teams added coding agents to the process they already had. An agent implements the change, another agent reviews it, a human reviews it, and integration tests run last. When the tests fail at the end, the repaired change goes back through both reviews. People still pass along diagnostics, ask for another review and restart work that has stopped. More agents raise output at one step, and reviews and coordination became the new bottleneck.

The same process with a coding agent implementing and testing, an independent agent reviewing and possibly testing, then a human reviewing and testing before automated integration checks. Failed checks return work to implementation. The team still coordinates the work and owns final approval and merge.
Before: agents added to the existing process. Checks run one after another, and a failed check sends the change back to implementation.

The fix is to change when the checks run, to shorten the time from implementation to team review. Agent review, human review and integration tests now start together. If an automated check fails, the human review request is withdrawn and an agent repairs the change straight away, without anyone passing the failure along. The quality bar is unchanged: all three checks must still pass before team review.

Implementation is followed by agent review, human review and integration checks, which can overlap. Each result can change what runs next. Starting a repair cancels checks in progress. All three checks must pass the current revision before team review.
After: the same checks run together. The process acts on the results it has so far. All three checks must pass the current revision before team review.

A model of the change predicted 22% less time from implementation to team review. In the first 24 changes afterwards, time fell 16% once differences in waits and stalls are removed.

Agents make a different order possible

Agents add an option the old process lacked: an agent can repair a failed integration test right away, without waiting for a person to pass along the diagnostics.

Recording each check’s result, duration and model usage against the code revision also gives the probabilities that a check passes and that a repair succeeds. With those probabilities, a standard partially observable Markov decision process (POMDP) calculates the best action: which checks to run in parallel or when to repair. Partial observability here means that nobody knows whether the code meets the quality bar until integration tests, agent review and human review all agree.1

What the pilot measured

Compared with the usual order, the model predicted 21.7% less time from implementation to team review for the fastest action. Measured, time was 15.7% less with waits and stalls removed and 49.7% less as recorded. The model predicted 9.9% more agent and test spending per change; measured with stall recovery removed at similar change sizes, spending was 12.7% less, a difference that is not statistically clear, and 45.7% less as recorded. Spending excludes human review.
Once waits and stalls are removed, time lands near the prediction. Spending didn’t rise as the model expected.2

The pilot measured the fastest action. It requests all three checks together. Once the tests and agent review report, it withdraws any pending human review if either check failed and starts a repair, with both sets of findings if both failed. If both passed, it waits for the human verdict if it hasn’t arrived. All three checks still had to pass before team review.

The model predicted 22% less time. As recorded, time from implementation to team review fell by half, but the earlier changes stalled more often: a failed command waiting for recovery, or a repaired change waiting for fresh approval. Review responses were also quicker during the pilot, an observer effect. Removing both differences leaves 16%, a little below the prediction. The records show the mechanism the model relies on: tests started before the first approval in every pilot change and in none of the earlier ones. Team review and merge come afterwards and weren’t measured, so the saving shortens total lead time only if team review takes no longer than before.2

On cost, the model expected agent spending to rise by about 10%: more agent reviews, paid for by fewer human reviews. Agent review spending did rise. Repairs went the other way. When the tests and agent review both failed, the repair agent got both sets of findings at once. Counting such a combined repair as two fixes, the number of fixes stayed about the same, but each fix cost about 30% less. The model repairs one set of findings at a time, so it missed that saving. With stall recovery removed and at similar change sizes, agent and test spending came out about 13% lower, though that is within the uncertainty.2

A simpler first step: move tests ahead of human review

Moving tests ahead of human review, with nothing else changed, gets about two-thirds of the modeled time saving and nearly all of the cost saving: 14% less time and 15% less cost. That is the first step for any team, and adopting it needs no model. The model found it and put a number on it. Running the checks together adds the rest of the time saving, 22% against 14%.3

Compared with the usual process, moving tests ahead of human review saves 14.2% of modeled time and 14.8% of cost. The fastest action saves 21.7% of time. The cheapest action saves 15.2% of cost.
Running the checks together adds the last third of the time saving, but almost nothing to the cost saving.3

The cost figures treat waiting as free: a change waiting for review, and the people waiting on it, cost nothing. Getting close to that takes a reviewer who works through reviews one after another with little context switching. Few organizations work like that, so the cost figures are a best case, and the process is optimized for time. The cost saving also depends on the reviewer. A review started on a change that is then withdrawn is wasted, and about 2.3 minutes of that per change cancels the modeled cost saving. A reviewer who would rather not be interrupted can wait until the tests and agent review pass. That costs the same, and the time saving drops from 22% to 17%. In a team, measure it by logging when a reviewer opens a change and comparing that with when its review request is withdrawn.3

The best action was chosen on early estimates. It did better than expected once checks could run together and repairs could combine findings. The larger reason to keep it is the model behind it: when an agent, a test suite or a review step changes, the time to team review can be re-estimated before deciding whether that engineering work is worth doing.

Estimating the impact of the next engineering investment

The model also shows how improving one part of the process affects the time needed to complete a change.4

Effect of a one-percentage-point change
Outcome that becomes more likelyExample: +1 pointModeled time
Test repair passes all checks38.8% → 39.8%1.0% less
Test repair introduces a human-review problem1.05% → 2.05%1.1% more
First implementation passes all checks6% → 7%0.8% less

Each row changes one assumption by one percentage point. That nearly doubles the 1.05% rate but changes the 38.8% rate by less than 3%, so the rows show where a point is worth most, not which problem is biggest. Improving one outcome can reduce the repeated work on which another improvement would act.

Consider the first row: an integration test fails on code that would otherwise pass both reviews. Raising the chance that its repair produces code acceptable to all three checks from 38.8% to 39.8% yields nearly a full percent less time across the whole process for a one-point improvement in that repair outcome.

Better test repairs show diminishing returns. Total modeled time saved rises to 32.4% at 100% repair success. Savings in each step decline from 9.7% for 38.8% to 50% success, to 4.2% for 90% to 100%.
Total savings compare with the 38.8% success rate and 581.1 modeled minutes; step savings compare with the preceding success level.4

The returns flatten in this sweep. Moving from 50% to 60% saves about 38 minutes; moving from 90% to 100% saves about 17 minutes. Even perfect repair in this one situation leaves about 393 minutes. Other repairs, required checks and waiting still consume time. The investment question is how much the next improvement would save and what it would cost to achieve.

In this example, improving test repair saves slightly more time than the same percentage-point increase in first-pass success. There is only one first implementation per change, but test repairs can happen repeatedly. Better repairs reduce the chance of sending work through another round of checks, repairs and waiting, so the improvement can save work more than once per change.

Where to start

Before adding more agents, look at what happens to a change from implementation to team review. The first step needs no model: move integration tests ahead of human review. That alone gets most of the time saving and nearly all of the cost saving. Running the checks together adds the rest.

If the extra time saving matters to you, or you want to estimate the impact of an engineering improvement before you make it, the next step is a cost model of your own process. That takes more work: the model needs measured inputs for every check, repair and wait in the process.5

I run this process in Parallix, the open-source tool I build for running coding agents in parallel. If you’re working on the same problem, I’d like to hear from you on LinkedIn.

Sources and methods

The model calculations are available on request.

1. The model

The model follows one change from implementation to team review. After each check result or finished repair, it decides which checks to start or withdraw and whether to start a repair. An integration test failure can be a flake. A repair addresses one check’s findings at a time. The calculation compares every combination of check order and overlap across four rounds of checks and repairs. It doesn’t model changes competing for shared test machines or reviewers.

2. Pilot measurement

The clock runs from the end of the first implementation, when the change goes to review, until the change is ready for team review, recorded as the squash merge into the developer’s branch, including waiting, reviews, tests and repairs. The pilot covers every change that went to review after the switch and was ready for team review by 24 November 2026, compared with 32 earlier changes chosen before the pilot. One change hit by an older approval bug and the study’s own changes are excluded. The comparison is before and after, not randomized.

Time per change fell from 7.71 to 3.88 hours as recorded (one-sided Welch test, p = 0.009). Adding back 54 minutes for faster review responses during the pilot gives 4.77 hours (p = 0.035). Both are statistically significant at the 5% level. Adding back the 1.73-hour difference in recorded stall time as well gives 6.50 hours, 15.7% less, or 14.1% at similar change sizes. That adjustment is conservative, since the new process may itself have avoided some of those stalls. The model counts minutes of work, not calendar hours, so compare percentages rather than absolute times.

Spending covers agent usage, priced at standard Claude Opus 5.5 rates whichever provider ran it, and integration test CPU. With stall recovery removed, it fell from $41.70 to $23.79 per change, or from $29.32 to $25.60 (12.7%) at similar change sizes. The 95% interval for that saving runs from −$9.35 to +$19.33 per change, so it isn’t statistically significant. The model predicted a rise from $25.37 to $27.87. Counting a combined repair as two fixes, fixes per change went from 4.42 to 4.47 and the cost per fix from $4.20 to $2.93. Active review minutes weren’t recorded; waiting for review is part of the measured time.

3. Model results and cost

Modeled time and cost per change: the usual order takes 742 minutes and $42.97; moving tests ahead of human review, 637 minutes and $36.61; the best order without overlap, 627 minutes; the fastest action, 581 minutes; the cheapest action costs $36.44. The 581 minutes uses recorded check durations. Depending on how durations combine when checks overlap, it lies between 573 and 627 minutes.

Agent usage is priced at $4 per million input tokens, $0.20 per million cached input tokens and $20 per million output tokens. Human review is priced at an assumed 4.3 active minutes at $100 an hour. Waiting costs nothing.

The fastest action costs $39.54 against $42.97, 7.98% less, or 9.07% less with measured test CPU costs, assuming the reviewer spends no time on withdrawn requests. Human reviews fall from 2.33 to 1.45 per change. The 2.3-minute break-even uses the measured test CPU costs. Requesting human review only after the tests and agent review pass takes 617 modeled minutes against 581.

4. Sensitivity

Each row raises one probability by one percentage point, scales the other outcomes of that step down proportionally and recalculates the time for the fastest action. The rows are separate scenarios and don’t add up. The fastest action stays the same in every row and at every point of the sweep.

The 6% first-pass rate is 2 of 34 changes delivered 11–17 November 2026 that passed all checks without being sent back.

The sweep varies test-repair success for code that would otherwise pass both reviews. The first step spans 11.2 percentage points and the others 10. The 100% point is a theoretical limit.

5. Inputs for your own model

For each check, you need how often it passes, fails or flakes, and how long it takes. For each repair, you need how often it succeeds and which checks it sends the change back through. You also need what each step costs. Here, integration tests averaged 6.1 minutes on 130 failed runs and 9.1 minutes on 117 passes, and 6 of 123 runs failed on revisions that also passed without a code change. Some repair probabilities are estimated rather than observed.

Magnus Ekdahl builds Parallix and writes about engineering with coding agents.