Trailside Research

Research15 min read

Our CI got 3× faster in a week: what our agents changed, and how sure we are

The median CI run fell from 10.52 to 3.15 minutes in a week, while the agents that build Trailside fixed much of their own CI and we cut the load on its machine. This is what changed each day, how we measured it, and how sure we can be.

Median CI run 3.15 min from 10.52 min · 3.3× faster
90th percentile, the slowest tenth 4.32 min from 23.03 min · 5.3× faster
Runs cancelled 2% from 13%

The night of 11 October against the 5 nights before it, 6 October to 10 October.

Summary

On the night of 11 October, the median run of our CI took 3.15 minutes. Across the 5 nights before it, it took 10.52 minutes. That is 3.3× faster. The slow runs improved even more: the 90th percentile fell from 23.03 to 4.32 minutes.

How much faster depends on the nights we compare with. Without 10 October, the worst of them, the median run was 2.8× faster. The night most like 11 October is 9 October: the same machine, 4 runners and 2 lanes of the Dev Loop. But the slower test selection of #526 merged at 03:50 UTC that night. Against the 61 runs before it, the median run on 11 October was about the same (3.30 against 3.15 minutes). The gain was in the slow runs, whose 90th percentile fell 1.6× (6.92 to 4.32 minutes), and in the runs on main (5.62 to 3.10 minutes). Against the whole of 9 October the median fell 1.6×, but almost all of that gap comes from the 20 runs after #526.

Most of the fixes were written by our agents. Claude Code agents and our Dev Loop wrote 13 of the 23 changes we list below, including 10 of the 12 on 11 October, the day of the biggest speed-up.

The difference is far too large to be chance (a Mann–Whitney U test gives p ≈ 9.0 × 10−19). But this is one night, and several things changed at once: the CI fixes, the load on the machine that runs CI, and, against the first baseline nights, the hardware. The rest of this post shows the data, the method and the limits.

Background: why CI speed matters to us

Trailside is a board for coding agents, and it is built mostly by coding agents. Our Dev Loop picks up GitHub issues and has agents plan, build and review each change, around the clock. Claude Code agents that we direct also review, fix and merge, mostly by day and sometimes at night.

Every change goes through CI before it merges: type checks and tests, on GitHub Actions. Our main branch is strict, so a pull request must be up to date with main before it can merge. When one pull request merges, the others have to update and run CI again.

So slow CI does not delay just one change. It holds up every agent that is waiting to merge, and every merge sends the others round again. By 10 October, CI was holding up the whole system. We measured it, and the agents worked on it.

What we measured

A CI run
One run of our CI workflow on GitHub Actions, for a pull request or for a push to main after a merge. GitHub's REST API gave us all 428 runs created on the nights we studied.
Duration
From the start of the run's latest attempt to its last update. It includes any time spent waiting for a runner.
Which runs we time
Runs that succeeded or failed. A failed run still made an agent wait. We count cancelled runs separately and leave them out of the durations. Some were stopped early, for example when a newer push replaced them. Others were stopped at the job's time limit: 9 of 9 on 5 October and 15 of 25 on 10 October. Those were the slowest runs, so leaving them out makes the baseline look faster than it was, and the comparison is, if anything, conservative: counting each of the baseline's 16 timed-out runs (on the nights above and on any other baseline night) at the time it was stopped, its median would be 11.10 minutes instead of 10.52.
Nights
From 21:00 to 06:00 UTC, the hours our Dev Loop works through overnight. A run belongs to the night it was created in. Most changes merged in these hours came from the Dev Loop and Claude Code agents; sessions we directed merged some too, and on some nights we restarted the Dev Loop by hand.
Baseline
Every timed run from the 5 nights from 6 October to 10 October, pooled: 244 runs. We left out 4 October, before the Dev Loop ran, and 5 October, its first night of test runs. The baseline includes the bad night of 10 October, which flatters the comparison: without it the median run was 2.8× faster, not 3.3×. So we also show every night on its own, and the result against other baselines under How sure we are.
Comparison
The night of 11 October: 112 timed runs.
Percentiles
With linear interpolation between ranks, as numpy does by default. One run in ten takes longer than the 90th percentile.
Runner-minutes
The time each job held a runner, added up over every job and attempt of a night's runs.
Time to merge
From opening a pull request to merging it, for the pull requests merged during a night.

What we changed, day by day

Each day below gives the problem we saw, the evidence for it, what we changed, and what happened next. Durations and counts come from the CI runs. Figures marked as measured in a pull request are that pull request's own measurements, which we did not repeat.

6 October Stop cutting slow runs off at 15 minutes

Problem
Our CI job had a time limit of 15 minutes. Slow runs were stopped at it before they could finish.
Evidence
On the night of 5 October, 9 of 33 runs were cancelled (27%), 9 of them when their job reached the limit.
Change
We raised the limit to 25 minutes. The same pull requests gave the Dev Loop checks to run before it starts each issue.
Effect
On the night of 6 October, 0 of 48 runs were cancelled. The runs were still slow: the median took 15.01 minutes.
  • #63 Prerequisite checks before each issue, on the Dev Loop's own database Dev Loop
  • #68 A daily cap, notifications and continuous running for the Dev Loop Other

7 October Test only what a change touches

Problem
Every pull request ran the whole test suite, so every check took as long as a full run.
Evidence
On the night of 6 October, the median pull request check took 14.84 minutes.
Change
Pull request checks now run only the tests that read a changed file. The full suite still runs after each merge to main, and every night.
Effect
On the night of 7 October, the median pull request check took 1.68 minutes. The slow runs stayed: one pull request check in ten took 16.29 minutes or more, and the median full run on main took 16.02 minutes.
  • #171 Pull requests run only the affected tests; the full suite runs after merge and every night Other
  • #192 Select the tests that read a changed file, not everything Other
  • #220 Run the slow evidence suites only when their own inputs change Other

8 October Move CI to our own machine

Problem
GitHub's hosted runners stopped taking our jobs because of a billing problem on our account.
Evidence
From 8 October, jobs sent to the hosted runners were refused, so CI could not check anything.
Change
We moved the check-and-test job to self-hosted runners on one of our own machines, behind a switch that can move it back.
Effect
CI ran again, but behind too few runners. On the night of 8 October, none of that night's runs got a runner until 00:24 UTC. Then one runner took the backlog, joined by a second at 02:05 UTC, and one run in ten took 55.67 minutes or more. From the next night, 4 runners shared the work.
  • #353 Qualify the self-hosted runner without moving the full checks Other
  • #363 Send check-and-test to the self-hosted runner behind a switch Other

9 October Speed up the full suite

Problem
The full test suite was slow on the machine our runners use, and a newer push to main did not stop the older run it replaced.
Evidence
The full suite took 520 s on that machine.
Change
We split the slowest test files and ran more test files at once, and a newer push to main now cancels the run it replaces. And the runner smoke test now passes on every runner on our machine, not only the first.
Effect
The pull request measured the suite at 155–186 s. On the night of 9 October, until the test-selection change of 10 October merged at 03:50 UTC, the median run took 3.30 minutes and one run in ten took 6.92 minutes or more. The runs after that change are covered under 10 October.
  • #427 Let every instance of our runner pass the runner smoke test Other
  • #451 Speed up the full test suite and cancel superseded runs on main Claude Code

10 October A fix that made CI slower

Problem
A pull request passed its checks and then broke main: the test selection had missed a test that scans files instead of importing them.
Evidence
The test that broke main never ran on the pull request.
Change
We closed the gap in the test selection. The fix merged at 03:50 UTC, still during the night of 9 October. Separately, from 00:09 UTC in the night of 10 October, the Dev Loop ran 3 lanes instead of 2 lanes, so more agents worked at once on the machine that runs CI.
Effect
Working out the test selection now took 6–9 minutes, and each pull request check did it 3 times. In the rest of the night of 9 October, the median pull request check took 17.85 minutes, against 1.51 before the fix. On the night of 10 October, the median run took 20.74 minutes, and 25 of 57 runs were cancelled (44%), 15 of them when their job reached the limit of 25 minutes.
  • #526 Select scan-based tests through the files they read Dev Loop
  • #610 Run the Dev Loop with more lanes Other

11 October The speed-up day

Problem
CI had become the bottleneck. Runs were slow, many were cancelled, and the agents and CI were competing for one machine.
Evidence
On the night of 10 October, the median run took 20.74 minutes. With 3 lanes and 4 CI runners, the machine's load average reached 40–50.
Change
In one day we merged a wave of fixes, most of them measured in their own pull request (listed below). The Dev Loop also went back to 2 lanes, which left more of the machine to CI.
Effect
On the night of 11 October, the median run took 3.15 minutes, one run in ten took 4.32 minutes or more, and 2 of 114 runs were cancelled.
Pull requests merged on 11 October
Pull requestWhat it didWritten byMeasured in the pull request
#640Raise the self-hosted job limit to 45 minutesOther–
#694Work out the affected-test selection once per run, and stop the selector blowing upClaude CodeSelection 498 s → 9.4 s
#695Clone test databases from a migrated template instead of migrating each oneClaude CodeDatabase tests 197–273 s → 78–90 s
#698Memoize the word-proof test helpersClaude Code452 CPU-seconds → 213 CPU-seconds
#701Fake clocks for the slow Companion tests, and the Bun suite beside NodeClaude CodeFull suite 547 s → 363 s
#704Make the Dev Loop's lane count a setting, back to 2 lanesOther–
#706Stop sending helper, Playwright-config and migration changes to the full suiteClaude CodeOne-file probe changes of these kinds: 350 s → 48–183 s
#712Faster job setupClaude CodeAbout 3 s per full run
#714Remove each test's temporary folders when it endsClaude Code127 GB of leftovers
#717Type-check full runs incrementally from a cacheClaude CodeType-check 106 s → 45 s
#718AGENTS.md and non-CI .github files no longer force the full suiteClaude CodeFull runs in the last 100 merges: 31 → 24
#729Skip the canvas audit when its inputs already passed on mainClaude CodeAudit 31.3–31.5 s → 0.28–0.29 s

Written by: Claude Code means a Claude Code agent that one of our workflows started; Dev Loop is our loop that picks up issues; Other is a session the owner directed, most of them in Claude Code too, so the agents' share in the summary is a lower bound. Each pull request is listed under the UTC date it merged.

Results

Every CI run, night by night. One dot per run, on a log scale; hollow dots were cancelled. The thick line is the night's median, the thin line its 90th percentile, and the dashed line the baseline's median.
Show the values as a table
CI run durations per night, in minutes
NightRunsTimedMedian90th percentileFastestSlowest
4 Oct2212.1012.3111.8312.37
5 Oct332411.4514.389.6514.85
6 Oct484815.0116.2510.4017.70
7 Oct424211.9716.910.9717.38
8 Oct44418.8555.670.0558.57
9 Oct88815.1217.050.7823.35
10 Oct573220.7435.294.7362.62
11 Oct1141123.154.320.975.85

The baseline nights mix fast and slow runs. From 7 October, a pull request check ran only the tests its change could affect: on the night of 7 October the median check took 1.68 minutes, while the median full run on main took 16.02 minutes. On the night of 11 October the two kinds were close: 3.20 minutes for a check and 3.10 for a run on main. The slow tail almost disappeared.

Share of CI runs cancelled, night by night.
Show the values as a table
CI runs cancelled per night
NightRunsCancelledShare
4 Oct200%
5 Oct33927%
6 Oct4800%
7 Oct4200%
8 Oct4437%
9 Oct8878%
10 Oct572544%
11 Oct11422%

On the night of 11 October, 2 of 114 runs were cancelled (2%). On 6 October and 7 October none were, so this is a return to normal rather than a record.

Runner-minutes of CI per pull request merged, night by night.
Show the values as a table
CI compute per merged pull request
NightRunnersRunner-minutesMergedPer merge
4 OctGitHub-hosted24.08124.08
5 OctGitHub-hosted436.851333.60
6 OctGitHub-hosted681.882034.09
7 OctGitHub-hosted402.701822.37
8 OctSelf-hosted190.371711.20
9 OctSelf-hosted537.282323.36
10 OctSelf-hosted1305.279145.03
11 OctSelf-hosted336.983210.53

On the night of 11 October, CI used 10.53 runner-minutes for each pull request merged, the least of any night. Up to 7 October those were minutes on GitHub's hosted runners, and from 8 October minutes on our own, so only the self-hosted nights compare fairly: 11.20, 23.36, 145.03, 10.53. The low figure on 8 October is partly because some jobs never got a runner that night.

Every night at a glance (durations in minutes)
NightRunnersRunsCancelledMedian90th percentileMergedRunner-minutes per merge
4 OctGitHub-hosted20 (0%)12.1012.31124.08
5 OctGitHub-hosted339 (27%)11.4514.381333.60
6 OctGitHub-hosted480 (0%)15.0116.252034.09
7 OctGitHub-hosted420 (0%)11.9716.911822.37
8 OctSelf-hosted443 (7%)8.8555.671711.20
9 OctSelf-hosted887 (8%)5.1217.052323.36
10 OctSelf-hosted5725 (44%)20.7435.299145.03
11 OctSelf-hosted1142 (2%)3.154.323210.53

How sure we are

Is the speed-up real, or was 11 October a lucky night? We asked three questions of the 112 timed runs of that night and the 244 of the baseline.

Are the run times different?

A Mann–Whitney U test compares two sets of numbers without assuming their shape. That matters here, because CI times are skewed and lumpy. It gives z = −8.85 and a two-sided p ≈ 9.0 × 10−19 (normal approximation, with corrections for ties and continuity). If both sets came from the same distribution, a difference this large would essentially never happen.

How big is the difference?

A random run from the night of 11 October was faster than a random baseline run 79% of the time. This is the probability of superiority, with ties counted as half. A half would mean neither tends to be faster.

How precise is the figure?

We resampled both sets of runs 20,000 times with replacement (a percentile bootstrap, with a fixed seed so the numbers reproduce exactly). The median changed by −7.37 minutes, with a 95% interval from −8.5 to −4.3 minutes. As a ratio, the median run was 3.3× faster, with an interval from 2.3× to 3.8×. We give the ends to one decimal: with another seed they move in the second.

The interval is wide and lopsided because the baseline mixes quick pull request checks with slow full runs. Its median falls in the gap between the two groups, so a resample can move it a long way.

How much does the baseline matter?

More than the interval suggests. The interval only covers the luck of which runs happened; the choice of baseline nights moves the figure further.

The night of 11 October against other baselines (durations in minutes)
BaselineTimed runsMedianMedian ratio90th percentileRatio
6 Oct to 10 Oct, as in the headline24410.523.3×23.035.3×
Without 10 Oct2128.802.8×17.384.0×
Self-hosted nights, 8 Oct to 10 Oct1546.712.1×33.417.7×
9 Oct, the whole night815.121.6×17.053.9×
9 Oct before #526613.301.0×6.921.6×

The closest comparison is 9 October. CI ran on the same machine with 4 runners, and the Dev Loop ran 2 lanes, as it did on 11 October, though its daily cap kept it idle for the first hour, and its lanes were busy 66% of the night against 80% on 11 October. But the night also holds the start of the regression: #526 merged at 03:50 UTC, and the 20 runs after it took a median of 12.67 minutes. Against the 61 runs before it, the median was about the same (3.30 against 3.15 minutes) and the 90th percentile fell 1.6×. Runs on main went from 5.62 to 3.10 minutes, while pull request checks got slower, from 1.51 to 3.20. So against that part of the night, the gain is in the slow runs and the full runs on main, not in the typical run, and with a busier Dev Loop and more CI runs on 11 October, a lighter load is unlikely to explain it. The two nights still differed in other ways: the code, the pull requests, and how many runs there were (88 against 114).

What these tests cannot tell you. They treat each run as independent, but runs on the same night share a machine, a queue and a codebase. The p-value is about runs, not nights: we compared one night with 5. The same night also set a record for merges, 32 against a typical 18 and a previous best of 23. If all 6 nights were alike, the last would be the best one time in 6 by chance alone (p ≈ 0.17). A one-night record is weak evidence on its own. The CI result is far stronger than the throughput result, and we need more nights to judge the second. That is the subject of our next post.

What didn't improve, and what else changed

  • The best earlier checks were already fast. Against the pooled baseline, the median pull request check fell from 7.45 to 3.20 minutes. But on the night of 7 October, the median pull request check took 1.68 minutes, and on 9 October, before #526, 1.51: both less than the 3.20 of 11 October. The gain is in the slow runs and in consistency, not in the best case.
  • Cancellations only returned to normal. They were already at 0% on 6 October and 7 October.
  • Changes did not merge sooner. For the pull requests merged on the night of 11 October, the median time from opening to merging was 63.48 minutes, against 38.20 on the median baseline night (the 5 nights' medians ranged from 16.67 to 252.67). Much of the rise is pull requests opened during the day that merged at night: 8 of the 32. For the 24 opened that night, the median was 34.39 minutes, close to the 31.10 of the median baseline night. Merges rose the same night, but one night cannot show that faster CI caused it.
  • The hardware changed. Up to 7 October, CI ran on GitHub-hosted runners. From 8 October, it ran on self-hosted runners, 4 of them by 11 October, sharing one machine with our agents. Runner-minutes on the two are not the same thing.
  • The load changed. On 11 October, the day of the CI fixes, the owner also took the Dev Loop back to 2 lanes, after 3 lanes and 4 CI runners had pushed the machine's load average to 40–50. Fewer agents on the machine leaves more of it for CI, so against the pooled baseline we cannot split the gain between the fixes and the lighter load. Against the part of 9 October before #526, with the same runners and lanes and a less busy Dev Loop, the median was about the same. The bad night of 10 October lines up mainly with the slower test selection. On 9 October, the 20 runs after #526 merged already had a median of 12.67 minutes. On 10 October, the third lane only started at 00:09 UTC, and the 14 runs created before it had a median of 28.85 minutes, against 18.01 for the 18 after it.
  • Strict main multiplies runs. Every merge sends the other open pull requests back through CI, so the number of runs per merge depends on how many pull requests are open at once, not only on CI itself.
  • It is one night. Everything here compares one night with 5. We will repeat the comparison as more nights come in.

Method and data

One script computes every CI number on this page, and the times to merge, from the data files, and writes the results file this page uses. The data comes from GitHub's REST API, taken on 12 October 2026 at 06:22 UTC. A few figures are cited rather than computed: the measurements made in pull requests, the Dev Loop's lanes and how busy they were, the machine's load average, and the two moments we split a night at (when #526 merged, and when the Dev Loop's third lane started). The changelog lists each with its source.

  • ci-runs.jsonl: one row per CI run, with its id, night, event, conclusion, attempt, timestamps, runner kind and the jobs that got a runner. Our runners' names are replaced with numbers.
  • merges.jsonl: the pull requests merged into main during the nights, with when each was opened.
  • changelog.json: what changed each day, and every figure we cite, with its source.
  • results.json: everything the script computed, which this page reads.
  • reproduce.ts: the script. It runs the analysis in analysis.ts, which uses the statistics written out in stats.ts and the number formats in format.ts.

To check our numbers, save all 8 files in one folder and run the script with a recent Node.js release that runs TypeScript files directly; nothing needs installing. With --check it recomputes every number and fails if any differs from the published results:

for f in ci-runs.jsonl merges.jsonl changelog.json results.json reproduce.ts analysis.ts stats.ts format.ts; do curl -fsSO https://trailside.io/research/ci-3x-faster/$f; done
node reproduce.ts --check

Our test suite runs the same check on these files. The tests also compare the statistics with worked examples and with numbers computed independently in Python.

Next: a study of the whole system, from issue to deploy, once more nights are in.

All research

Research from the team building Trailside. We publish what we measure, with the data and the code behind it.

Claude, Claude Code and GitHub are trademarks of their respective owners.