Moving an agent-written codebase to faster GitHub Actions runners
Swap runner labels, fix caching, then trim tests without weakening CI.
Sponsored by Graphide

Moving an agent-written codebase to faster GitHub Actions runners is a migration exercise. The existing YAML is the asset. Shorter waits without weaker verification depend on the order of changes, from runner labels and cache configuration to selective tests and verdict integrity.
Why agent-written codebases stress standard GitHub Actions runners harder than human-written ones
Claude Code, Codex, and Cursor create pull requests faster than slow CI loops can keep up with them. Each commit waits through a runner queue, dependency restoration, and test execution before its author gets a result. At high PR volume, those delays compound across agent-generated changes, even when each change is small.
Standard GitHub-hosted runners use small, shared machines, which constrains CPU-bound compilation and test execution. Newer-generation runners have much faster hardware. Yet execution time is only part of the delay, because cold dependencies and a full test run add work around the build itself. The workflow already sets out the steps, conditions, and checks that code must pass. That makes the existing GitHub Actions YAML an asset, rather than something that needs replacing when the machines change, which is the premise behind Graphide CI, a service that runs those same jobs on faster GitHub Actions runners with warm caches, splitting long test steps only where a check shows every result stays the same, so a failing test still fails the job.
What the GitHub Actions runner market looks like after the 2026 consolidation
The managed-runner market restructured in 2026, making vendor viability part of the evaluation. Speed alone is an incomplete buying criterion. A provider must also meet the workload’s requirements for reliability, portfolio breadth, transparent pricing, and enterprise-readiness. These options keep GitHub Actions as the orchestrator, so the cost to switch is low at first, but the provider choice shapes how things run over time.
Pricing also needs a workload-level view, because a faster runner can finish before a cheaper-per-minute machine. GitHub’s documented macOS minute multiplier adds another consideration for mobile-heavy workloads, and alternative providers do not all price macOS alike. Microsoft postponed indefinitely its planned March 2026 platform charge for self-hosted runners after community backlash, but that postponement does not make the underlying compute free.
How the main runner providers compare for agent-output verification workloads
Docker-heavy verification benefits from infrastructure that shortens image builds as well as test execution. Depot places BuildKit builders next to the runner, with fast layer caching and roughly three times faster image builds. Its migration uses the depot-ubuntu-latest label. Blacksmith offers bare-metal Ubuntu microVMs roughly twice as fast as GitHub-hosted runners, with cross-branch Docker layer caching available as a paid add-on. That cache needs Blacksmith-specific actions, so using it takes more than the first runner-label change.
For mixed Linux workloads, per-job sizing separates lightweight checks from expensive compilation. Its persistent cache volumes keep data on solid-state local storage, with no need to upload or download it. Bitrise Build Hub offers granular AMD EPYC sizing up to 192 vCPU. This gives teams a choice of specific shapes rather than forcing every workload into standard power-of-two sizes.
Serial compilation calls for a different comparison. Avrea’s October 2026 ARM benchmark covered 36 arm64 runners from seven providers, with jobs run between October 22 and November 2 and the last run on November 2, 2026. Avrea’s Apple M5 Max runners finished first at two-vCPU, four-vCPU, and eight-vCPU sizes on a cold Rust build. The same benchmark measured Avrea’s highest arm64 single-thread score, which makes it useful for comparing Rust or Go workloads with a lot of serial compilation. The result applies only to the workload that was measured.
AWS-native teams have another operational choice in RunsOn. RunsOn’s published comparisons show substantially higher single-thread performance for its m8azn runners than GitHub-hosted Linux, with spot or on-demand AWS rates often materially lower per minute. Flex labels select compute, image, storage, and networking per job, while Fleet provides platform-approved shapes by name. RunsOn’s documentation describes Fleet as production-ready and advises pinning an exact Terraform module version before broad rollout. For Kubernetes-first teams, Actions Runner Controller instead fits runner pods beside other cluster workloads, with the team operating the cluster, controller, autoscaling, and images.
The one-line runner change and what it actually does to the workflow file
To begin the migration, change one job’s runs-on value to the selected provider’s label. Leave its downstream steps and conditions untouched. Secret references and artifact uploads also remain in the existing workflow, because moving execution does not require rewriting the job. Depot uses depot-ubuntu-latest, while Namespace uses namespace-profile-<profile-name> for a profile created in its dashboard. Avrea requires its GitHub App first, followed by a label such as avrea-ubuntu-latest-arm-4-vcpu.
Different jobs can use different labels in the same file, so a lint job need not inherit the build job’s machine size. Measure before committing to a larger runner. macOS, Windows, ARM, and existing self-hosted or third-party jobs require separate provider-support checks and explicit changes. A successful Linux migration does not establish compatibility for those jobs.
Why cache scoping breaks warm runners and how to fix it before benchmarking
A faster runner can appear ineffective when every run restores dependencies from scratch. Cache configuration is often the hidden cause. GitHub Actions scopes caches by Git ref, so workflows triggered only by pull_request do not share their newly populated caches across branches, even with identical keys. A PR can instead reuse a cache populated on its default or base branch. Without that base-branch cache, successive PRs can each start cold.
To correct that behavior, add a push-triggered warm-up job on the base branch that populates the cache. For example, pnpm fetch downloads packages without linking node_modules. Check the job logs for cache hits before comparing providers. First distinguish cold runs from warm runs, then compare providers using the warm baseline. Otherwise, the measurement mixes machine performance with dependency restoration and can misidentify the source of the delay.
Persistent storage offers an alternative to GitHub’s ref-scoped cache mechanism. Namespace mounts its cache volumes directly on the runner, making them readable and writable without a transfer step. Its nscloud-checkout-action also maintains a persistent git mirror and fetches only the delta on later runs, reducing large-repository checkout from minutes to seconds. Blacksmith’s cross-branch Docker layer cache removes the ref-scoping constraint for image layers across runners in a repository and organization. These “warm runners” have architectures that address particular cache paths.
Selective test execution for agent-generated changes without changing the CI verdict
Once caches are warm, full-suite execution becomes the next source of avoidable work for many small, targeted agent changes. A dynamic matrix can narrow the work to changed packages. The standard pattern uses a detect job that diffs HEAD~1 against HEAD, filters paths such as packages/, deduplicates the package names, and emits a matrix. A downstream test job then fans out over those packages. This cuts needless test runs only when the chosen packages cover the tests that the changes affect.
A changed-file script identifies paths, but does not by itself establish which job combinations or tests reach the changed code. Reachability analysis addresses that question by tracing calls through to the tests that exercise a function. When reachability is uncertain, run more tests, never fewer. Selective execution is acceptable only when it preserves the full CI verdict, and a failing selected test must still fail the job.
Concurrency also limits how much useful parallelism a matrix provides. GitHub Actions runs one job per matrix combination, up to 256 per workflow run. A 4×4 matrix produces 16 parallel jobs, which can quickly consume an Actions concurrency budget on larger runners. Right-size each shard and set max-parallel accordingly. That setting limits simultaneous jobs and spend without reducing the total work selected for execution.
Preserving CI verdict integrity on agent-written changes
Faster execution of a test suite that accepts incorrect behavior returns the weak signal sooner. Line coverage measures whether code executes, so high coverage can coexist with tests that validate bugs. For agent-generated changes, use mutation score thresholds on changed code alongside line coverage. The gate should test whether the suite can detect faults in the code it exercises.
Review provides a separate verification layer, especially when a pull request changes the checks that judge it. Agent-authored CI configuration changes need to be reviewed before the application code that comes with them. An agent that weakens coverage settings or removes security checks can defeat the other controls without changing the runner. The code-writing agent and the verification system should therefore have separate contexts and explicit permission to fail the work.
Dependency and supply-chain verification as a mandatory CI step for agent-generated code
Agent coding tools can fabricate package names. If an agent resolves such a name autonomously, the resulting dependency may come from an attacker-controlled source. CI must check the lockfile as a required step. Treat lockfile diffs in agent-generated PRs as security events, with every new or changed dependency checked against its target registry. Those checks should confirm who the publisher is and the registration date before the dependency is adopted.
Enforce hash verification and lockfile pinning in pipelines for AI-assisted projects, and prevent package-management agents from installing packages without human review or an allowlist. SBOM generation should also be mandatory. It provides a verifiable record of the code being shipped, making the dependency set explicit. These checks belong in the same GitHub Actions workflow as additional jobs or steps on the faster runners. Their presence must also be checked during CI configuration review, so that a migration or agent-authored edit does not remove the supply-chain gate.
The migration sequence that keeps CI trustworthy at every step
First, move one Linux x64 job by changing its runs-on label, then confirm that it passes before moving others. This isolates machine compatibility from later workflow changes. List macOS, Windows, ARM, and existing self-hosted jobs separately to check whether the provider supports them. Keep the original label available for a manual revert.
Second, fix cache scoping before treating timing results as evidence about a provider. Add the base-branch push warm-up job and confirm cache hits in the logs. This closes the cold-start ambiguity in the benchmark. Compare providers only after establishing warm runs.
Third, add selective execution through a detect job and dynamic matrix keyed to changed packages or files. Preserve the uncertainty fallback described earlier by running more tests when reachability is unclear. Set max-parallel as the matrix grows.
Fourth, gate changed code on mutation score rather than line coverage alone. Fifth, enforce lockfile pinning, hash verification, and manual or allowlist-gated dependency approval, with SBOM generation in the workflow.
Finally, review agent-authored CI configuration before application code, as a distinct check. The existing YAML stays the governing record of what must pass, even as execution moves to faster machines.


