AI-driven code volume strains CI: How Linear fixed it

Original: AI coding has made CI a bottleneck, so we reworked ours to keep up

Why This Matters

As AI agents push code volume higher, CI scalability becomes a hard engineering constraint for every team.

Linear rebuilt its CI pipeline after AI coding agents caused a sharp spike in pull request volume. Despite test suites nearly quadrupling in 2026, the team cut PR wait time from 6+ minutes to just over 5 and halved runner time per test through infrastructure upgrades, toolchain modernization, and smarter job orchestration.

Linear engineer Mufeez Amjad was handed a blunt assignment by CTO Tuomas earlier this year: CI costs are high — fix it and make it faster. The root cause was straightforward. AI coding agents had dramatically accelerated code output, but every PR still had to clear the same CI gauntlet, turning validation into the new bottleneck.

The team attacked the problem on four fronts. First, migrating workloads from GitHub Actions to third-party runners with faster CPUs and better cache infrastructure alone cut average job time by 34%, with TypeScript's tsc check dropping 52%.

Second, switching to tsgo — the native TypeScript compiler — slashed the weekly median tsc time by 73%, removing type-checking as the pipeline's chokepoint entirely. Third, the team rewrote custom ESLint rules to use AST-based static analysis rather than the full TypeScript type graph, reducing API lint time by 68% and full-repo lint time by 55%. This also eased a later migration to Oxlint.

Finally, Linear optimized the small jobs that sit at the head of the pipeline — change detection and cache-hit checks — because any delay there holds back all downstream shards. Fetch depth was trimmed so each job retrieves only the git history it actually needs.

The cumulative result: test suites grew roughly 4x since January, yet PR wait time fell and runner cost per test was cut approximately in half.

Source

linear.app — Read original →