English

Product LaunchesLinear

Linear Reworks CI Pipeline to Mitigate Bottlenecks Caused by AI-Driven Development

AI coding agents have significantly increased the velocity of code delivery, but at Linear, the continuous integration (CI) process became a bottleneck. As development accelerated, validating changes via CI drove up infrastructure costs and increased wait times for developers and agents. In response, Linear overhauled its CI system, successfully reducing pull request wait times from over 6 minutes to just over 5 minutes, while roughly halving the runner time per test.

The optimization involved improvements across four key areas: infrastructure, toolchain, linting, and system-wide workflows. Linear migrated workloads from GitHub Actions to third-party runners with superior CPU, storage, and cache capabilities, resulting in an average job speed increase of 34%. The company also modernized its toolchain by switching to tsgo, a native TypeScript compiler, which cut the weekly median tsc check time by 73%.

To optimize linting, Linear rewrote its custom rules to use static analysis via the abstract syntax tree (AST) instead of relying on TypeScript type information. This change allowed ESLint to function without the full type graph, reducing API lint time by 68% and full-repository lint time by 55%.

At the system level, Linear optimized "gate" jobs—small tasks that run before larger test suites. By capping fetch depths and using sparse, blobless checkouts, the company reduced checkout times significantly. Additionally, by consolidating setup tasks and using pre-built CI base images, Linear reduced per-shard setup time by approximately 44%.

To further improve performance, Linear leveraged Vitest to parallelize test suites more aggressively, increasing the number of test shards from four to eight. A major contributor to this was the introduction of an opt-in configuration in Vitest that allows safe files to share a module registry, bypassing the overhead of rebuilding the module graph for every test file. Linear noted that this optimization alone yielded roughly a 17% monthly saving in runner costs.

Sources

  1. AI coding has made CI a bottleneck, so we reworked ours to keep up (Hacker News Frontpage, 2026-09-21)