We raised $3M for agent-native runners

Bake stable dependencies into runner images

Prepare versioned system dependencies and build downloads once in the runner image instead of installing them on every job.

How companies used this technique

Read what each company changed and follow the original sources.

Bake versioned build downloads into the runner image

Bun bakes a read-only prefetch store of its dependency tarballs, WebKit prebuilt and zig compiler into its build images. A build copies a prefetched file when its URL matches and downloads from the network when a version has changed.

Before the change every CI build downloaded about 18 archive tarballs, a 200 MB WebKit prebuilt and a zig compiler before compiling. Source

Use it when
Builds on fresh runners download the same large, versioned inputs on every run, and you control the runner image.
Before applying it
Entries are keyed by exact URL or version, so a bumped dependency downloads fresh until the image is refreshed.

Bake stable system dependencies into the CI image

Each API test shard spent 7 to 8 seconds installing the same Postgres client with apt. Linear moved it into a small CI base image with Node and the client, and later added the native build headers whose downloads could occasionally hang.

Together, the CI base image, the filtered install and dropping the node_modules cache reduced per-shard setup time by roughly 44%, from 110-140 seconds to 67-73 seconds. Source

Use it when
Multiple jobs repeat stable OS-package setup on equivalent environments.
Before applying it
Pin and rebuild the image, patch vulnerabilities and measure image-pull cost. Repository secrets and mutable build outputs do not belong in the image.

Company Playbooks