Linear Reworks CI Pipeline to Cope With Surge in AI-Generated Code
The project management startup cut pull request wait times and halved per-test runner time even as automated agents drove test suite volume up fourfold.

Project management software maker Linear has re-engineered its continuous integration architecture after a surge in AI-assisted code generation created testing bottlenecks and increased infrastructure costs, according to an engineering report published via Hacker News (https://linear.app/now/ci-bottleneck-reworked). Linear reported that while coding agents have accelerated development velocity, automated test suites struggled to keep pace, leaving developers and AI agents waiting on validation.
The optimization push began earlier this year when Linear chief technology officer Tuomas tasked the team with cutting CI costs while increasing speed. Linear's internal test suite has nearly quadrupled since the start of the year as the company adds roughly 2,000 tests per week, with automated agents now authoring the majority of new tests. Despite that growth, Linear reported it lowered pull request wait times from more than six minutes to just over five minutes, while cutting runner time per test roughly in half.
To set a faster baseline, Linear shifted CI workloads from standard GitHub Actions environments to third-party runners equipped with faster processors, higher-performance storage, and improved caching. Across comparable two-day periods surrounding the migration, job runtimes dropped 34% on average, with TypeScript compiler jobs falling 52%. Switching the typechecking workflow to native compiler tsgo reduced median tsc execution time by 73%.
The company also targeted memory overhead during linting. Linear rewrote custom lint rules to run static abstract syntax tree analysis rather than requiring full TypeScript type graphs, cutting API lint time by 68% and repository-wide lint time by 55% while setting up a subsequent shift to Oxlint. On the job orchestration side, Linear capped git fetch depths on change-detection gates, shaved 42 seconds from merge paths by moving cache-marker writes out of gating checks, and replaced standard actions/checkout steps with custom composite actions using backoff logic and sticky-disk git mirrors to bypass network stalls.
Linear tackled per-shard environment setup overhead by creating custom base Docker images containing Node.js and PostgreSQL dependencies, while restricting pnpm package installations to the API workspace rather than the entire monorepo. The team also substituted full database migration replays with pre-generated schema snapshots, reducing database initialization from roughly 12 seconds to one to two seconds per container. Consolidating seven standalone check jobs into two concurrent tasks saved roughly 87,000 runner-minutes per month, representing 11.8% of Linear's total CI usage based on June data.
To maximize test parallelism, Linear split large test files, expanded API suite sharding from four to eight shards, and introduced an opt-in non-isolated project mode in Vitest. Allowing safe test files to share module registries reduced API-shard runner time from 32.8 minutes to 22 minutes per run and delivered roughly 17% in monthly cost savings. Linear estimated that without these infrastructure changes, its test suite would now take roughly 11 minutes per pull request.
Sources
Written by
The Company Wire
Inside the companies building what’s next. Reporting on startups, technology, funding and the people shaping them.



