ReleaseInsight · On RadarX: @yonasbe→ original

OpenClaw Cut CI Spend by 95.5%, and 46 Tweaks Became an Agent Playbook

Every push to a repository triggers CI: automated tests and checks that consume machine time and money. The OpenClaw project cut that consumption by 95.5% by no longer running unnecessary jobs on every change. Drawing on engineer Vincent's write-up and 50 merged PRs, the authors compiled 46 GitHub Actions tweaks and packaged them as a prompt for an AI agent. The takeaway: CI optimization can be assigned to an agent on an ongoing basis instead of cleaning up the pipeline once a year.

AI-processed from X: @yonasbe; edited by Hamidun News
OpenClaw Cut CI Spend by 95.5%, and 46 Tweaks Became an Agent Playbook
Source: X: @yonasbe. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceX: @yonasbe ↗
Editor-in-Chief
Key metric #1The full test suite on main runs on a schedule, not on every push
Key metric #2Tests are selected based on changed code, and when in doubt the full suite runs
Key metric #3Seven static analysis scans were merged into three, and old runs are cancelled

Every time a developer pushes code to a repository, CI runs: an automated system that executes tests, linters, and builds. These checks run on rented machines (runners), so every extra minute turns into money and queueing. The OpenClaw project cut CI consumption by 95.5%: out of every 100 minutes of machine time, roughly 4–5 remain. Engineer Vincent described in detail how this was done, and the playbook authors analyzed his post and 50 merged pull requests in the OpenClaw repositories and derived 46 tweaks for GitHub Actions (GitHub's CI service). They can be given to an AI agent as a ready-made prompt.

What exactly was done with CI

The tweaks are grouped under three ideas: don't run unnecessary jobs, distribute what runs evenly, and save within each job.

The first group is called "run less on each change":

  • The full test suite for the main branch runs on a schedule after merge, not on every push;
  • Tests are selected based on the code the PR actually changed, and if there is no confidence, the full suite runs;
  • Deploy workflows are skipped when a change touches only tests;
  • Outdated runs are cancelled before they occupy a runner.

The analogy is simple: if you fixed a typo in the README, nobody needs to re-verify the entire firmware. Until CI can tell the difference, it spends minutes on empty work. And if an author pushes three commits in a row, the first two runs are no longer needed by anyone, so they should be cancelled immediately.

Balance and savings within jobs

The second group concerns parallel work. Large test suites are split into shards, that is, parts that run simultaneously. The authors suggest distributing tests across shards by measured duration rather than "evenly by files," and rebalancing when the slowest shard starts lagging. Total run time is determined by the longest part: one overloaded shard eats the gains of ten fast ones.

The third group: do less work in each job.

  • Use a native type checker for faster type checking;
  • Merge seven static analysis scans into three;
  • Fetch only the git history and build only the artifacts that a specific job needs.

Nothing exotic here. This is engineering hygiene that many know about but rarely finish: cleaning up a pipeline by hand is tedious, and it never looks urgent.

The agent as a permanent CI maintainer

The most interesting part of the story is not the list of tweaks but the fact that the CI cleanup at OpenClaw was not a one-off. Vincent put it this way: agents are now used to continuously improve the CI process, not only to write code that passes through it. Some of the described changes were opened by the project's own bot. Agents watch every run and open PRs so the next one is faster.

For practitioners, three things follow. The playbook can be handed in full to your own agent, asking it to propose changes for your repository. CI configuration becomes an object of ongoing refactoring, just like application code. And the savings accumulate: fewer runs mean shorter queues, a smaller bill, and faster feedback for developers.

Limitations

The 95.5% figure applies to one project with its own run history. If your CI is already optimized or your repository is small, the effect will be more modest. The source materials contain no absolute dollar amounts or before-and-after run times, so the savings cannot be converted into dollars. Selecting tests based on changed code is risky: without a reliable fallback to the full suite, you can miss a regression, and it will cost more than the minutes you saved. Finally, Vincent's write-up was sponsored, so it is worth checking the advice against your own measurements.

A sensible order is this: first measure where the minutes go. Then implement the safest tweaks, namely cancelling outdated runs and skipping unneeded deploys. After those, move on to test selection and shard rebalancing. And only then assign the agent to watch the pipeline on an ongoing basis.

Story

Key Questions Answered

What exactly was done with CI?

The tweaks are grouped under three ideas: don't run unnecessary jobs, distribute what runs evenly, and save within each job. The first group is called "run less on each change": The full test suite for the main branch runs on a schedule after merge, not on every push; Tests are selected based on the code the PR actually changed, and if there is no confidence, the full suite runs; Deploy workflows are skipped when a change touches only tests; Outdated runs are cancelled before they occupy a runner.

What are the key details on Balance and savings within jobs?

The second group concerns parallel work. Large test suites are split into shards, that is, parts that run simultaneously. The authors suggest distributing tests across shards by measured duration rather than "evenly by files," and rebalancing when the slowest shard starts lagging. Total run time is determined by the longest part: one overloaded shard eats the gains of ten fast ones. The third group: do less work in each job.

What are the key details on The agent as a permanent CI maintainer?

The most interesting part of the story is not the list of tweaks but the fact that the CI cleanup at OpenClaw was not a one-off. Vincent put it this way: agents are now used to continuously improve the CI process, not only to write code that passes through it. Some of the described changes were opened by the project's own bot. Agents watch every run and open PRs so the next one is faster. For practitioners, three things follow.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…