Yonas Beshawred, Co-founder & CEO, StarSling Last month Anthropic explained how they scaled CI using test impact analysis: running only the tests a change can affect. Their engineers now ship 8x as much code per quarter as they did from 2021-2025, and their CI jobs grew 25x in six months. Their merges went from about 2,500 a day in May to more than 30,000 a day in September, according to their source control team. The post explains why CI strains once agents write most of the code, and how they rebuilt their test selection service to keep up.
We built a skill called ci-speedup with over 80 CI optimizations that your agent can use to make your GitHub Actions faster, including the ones that bring test impact analysis to a GitHub Actions repo. This post is a remix of Anthropic's post, for agents. Anthropic built a dedicated service for the load they run; most teams run GitHub Actions so we tied each of their techniques to a GHA pattern in the skill, so your agent can implement it on your own repo.
Just send this post to your agent and they'll work through the techniques, then suggest installing ci-speedup to check for more, including Linear's CI playbook. You can find ci-speedup on GitHub and on skills.sh.
StarSling is agent-native CI: fast GitHub Actions runners with AI agents that keep finding and shipping optimizations like the ones in this post, while you sleep. It's trusted by AI-first teams like Mastra and Better Auth (Vercel). Install it for free and check out our docs.
Start here
Run these four test impact techniques on your repo
Prompt for your agent: apply all four #
Source: ci-speedup The quoted passages below are from Sachin Malhotra’s article for Anthropic and from Anthropic’s source control team. Anthropic is not affiliated with StarSling and did not review this post.
Anthropic engineers on average ship 8x as much code per quarter as they did from 2021-2025. Claude authors 80% of that code and it also plays a large role in reviewing and approving PRs as well.
Writing code is no longer the constraint, and once PR review gets accelerated, CI starts feeling the pressure.
On top of that, the amount of tests across our codebase grew 10x and we added a nominal amount of engineers. This all led to a 25x increase in CI jobs over a six month period (in case you are trying to do the math, not every test runs on every PR as I will explain).
This threatened to overload our test impact analysis service several times. To avoid becoming the next bottleneck, we blew up the whole thing and reimagined what the service's architecture looks like. But getting there was a bumpy path that started with three quick fixes, which lasted 70 days, then 29 days, and then less than a day respectively.
This distributed architecture is more expensive to run, but it is much easier to scale and memory profile than a shaky singleton. This project took three weeks for a single engineer. A year ago it would have been closer to a quarter.
Many of my peers work at organizations where every test is still run on every change. This works up to a point, but doesn’t scale: CI gates get increasingly long, expensive, and untrustworthy.
Additionally, humans are great at determining which test failures don’t apply to them while agents will require more context and direction. When they get a specific set of valid tests, they can self-verify and iterate more effectively.
At Anthropic, we built a deterministic test impact analysis or test selection service that determines which tests run on each change based on past performance and package relevance. This isn’t an uncommon practice, and there is a category of vendors with offerings in this area.
Anthropic’s service reads the history of every test result, and they built it as a dedicated service sized for the load they run. On GitHub Actions, most teams already hold the package half of that signal: the dependency graph in their build tool. Turborepo, Nx, Bazel, Gradle, Vitest and Jest can each work out which packages and tests a change reaches, and a workflow can run just those on a pull request. The four techniques below start there, then cut the workflow runs a change never needed.
Each prompt below fetches its pattern from the ci-speedup catalog, checks your repo against that pattern’s own conditions, and opens a PR you can review.
This is the closest match to Anthropic’s selector. It selects from the dependency graph: a pull request runs the tests of the packages it changed and of every package that depends on them, while the default branch and the merge queue keep running the full suite. Anthropic’s service also reads each test’s result history and selects on past performance as well as package relevance; the dependency graph tells you which tests a change can reach.
Affected tests
Patterns: OPT70 Scope the Build/Test to Only What Changed, OPT34 No Changed-Package Filtering
Prompt for your agent #
A docs edit has no reason to start an end-to-end suite. Path filters let each workflow and job run when the files it tests change, and a job-level condition keeps a required check reporting success when its job skips.
Path filters
Patterns: OPT32 Missing paths/ paths-ignore on Expensive Workflows, OPT40 Monorepo Job Runs Regardless of Affected App, OPT39 Multi-Language Matrix Without Path Filter
Prompt for your agent #
A push to a pull request branch can start the same workflow twice, once for the push and once for the pull request, and a title edit can start it again when the workflow listens for edited. One run per commit keeps the run that gates the merge and removes the copies.
One run per change
Patterns: OPT47 Redundant push + pull_request Double-Trigger, OPT38 Non-Content Trigger Event Types (PR edited, etc.)
Prompt for your agent #
A hung job holds its runner for up to six hours, GitHub’s default limit. A timeout set from the job’s own run history ends it in minutes, and the prompt lists the tests that hung, by name, for you to fix.
Timeouts on flaky jobs
Pattern: OPT57 Missing timeout-minutes on Known-Flaky Integration Jobs
Prompt for your agent #
This has changed the shape of PRs over time at Anthropic as Claude prefers smaller, more granular PRs (another good reason not to run every test against every PR). This has translated into more CI jobs in a given day. Also, the activity level floor is raised as agents push overnight and on weekends, but it remains bursty as human engineers still drive and approve a significant amount of PRs.
My advice to engineering teams is, whether you build or buy, assume your architecture will be at a 25x load within two quarters.
Smaller PRs and agents that push through the night mean more workflow runs per day from the same team. Every run a path filter skips and every duplicate trigger removed is saved again on each of those runs, so the saving grows with the load.
We perform on the order of 25 million code checkouts per day for CI, before counting developer environments, agent sandboxes, and research jobs.
Anthropic, Redesigning source control at Anthropic (October 13, 2026), Growing our monorepo Every workflow run starts with a checkout, so the runs these four techniques remove also remove their checkouts.
What does CI even mean when hundreds or even thousands of changes can merge while tests are running? We haven’t been able to effectively replicate the industry standard of a global repository lock on the merge queue, so instead, we’ve invested in post-merge and pre-deploy automated testing. This does mean that concurrent changes can conflict, but Claude can typically fix these conflicts faster than humans can even identify them.
Anthropic, Redesigning source control at Anthropic, What we learned building Scion Testing after merge works when the checks on each pull request stay fast. That is the job of the four techniques above: each pull request runs the tests it can affect, and the full suite still runs before anything ships.
Keep state out of the process from the start. I’d also avoid running any critical service as a single instance unless you can measure it and any canary changes. CI is evolving too quickly to proceed any other way.
Anthropic ends where every team doing this work ends: CI keeps growing, and the work keeps going. That is the job ci-speedup is built for. Run it again whenever CI slows down, and it checks your latest runs against its whole catalog, these four techniques included, and names the next bottleneck with numbers from your own history. If you would rather not run that loop yourself, StarSling Runners come with agents that keep opening PRs to make your runs faster.
Install ci-speedup on its own:
Prompt for your agent: install ci-speedup #
Start here
Run these four test impact techniques on your repo
Prompt for your agent: apply all four #
Source: ci-speedup Keep reading