2,100 runs a day: how our AI agents quietly blew up our CI — and how we fixed it at the source
AI agents took our CI from 100 to 2,100 runs a day without anyone noticing. What we found, what we removed, and the one rule that stops it coming back.
On 15 November at 19:52 UTC, GitHub Actions stopped running for every repository in the bitbaum organization. No checks, no merges, no deploys. The organization was flagged and hidden from public view.
We did not see it coming. We should have. This is what we found when we went looking, what we changed, and the one rule we now enforce so it cannot happen again.
- 4.6×
- growth in real work
- 21×
- growth in the machinery around it
- 126
- machine-hours on the last full day
- 42
- jobs running at the same moment, at peak
The numbers nobody was watching
Most of the code at bitbaum is written by AI agents. They open pull requests, a check runs, and finished work merges and ships by itself. That is the point: work should not wait for a person to press a button.
So we counted what that machinery actually did, from GitHub's own run records:
| Real changes merged per day | Workflow runs per day | |
|---|---|---|
| June–July | ~31 | ~100 |
| August | rising | ~1,200 |
| November | ~144 | ~2,100 |
The real work grew about 4.6 times. The machinery around it grew about 21 times.
And from the outside, nothing looked different. Deploys arrived as they always had. The cost was entirely on GitHub's side, so it was invisible to us.
So where did two thousand runs a day come from?
A machine that woke itself up
Almost none of it was real work. It was automation, added one reasonable step at a time.
flowchart TD
T["Every hour<br/>×56 repositories"] --> S["Sweep<br/>wakes up"]
S --> Q{"Anything<br/>green?"}
Q -->|no| T
Q -->|yes| M["Merge, then<br/>re-arm and<br/>check again"]
M --> S- A merge sweep in every repository, on a timer. In early August we added a workflow that wakes up, looks for green pull requests and merges them. Each repository got its own copy. In October the timer went to hourly. Fifty-six repositories × 24 hours ≈ 1,344 runs a day, most of which found nothing to do.
- Chains that wake the sweep. When a merge happened, another workflow re-armed the sweep in case more work was waiting. Then "wake sweeps" were added to make sure no green pull request waited too long.
- Every change checked twice. Once on the pull request, and again after it merged into main: the same code, the same tests.
- More checks on top. Browser screenshot checks, added in October, ran another ~150 times a day.
Each addition solved a real, local problem: "a green pull request waited an hour", "a merge didn't trigger the next one". Each was written by an agent asked to fix exactly that problem, and each was a good fix on its own. Together they turned a quiet repository into a machine that woke itself up all day to look around.
Agents optimise locally, and free compute hides the total.
Nobody, human or agent, was looking at the sum.
Under the hood: the arithmetic
- Real work: ~144 merges a day in November against ~31 in June–July is ×4.6.
- Machinery: ~2,100 runs a day against ~100 is ×21.
- Sweeps: 56 repositories × 24 hourly runs = 1,344 runs a day before a single merge happened.
- Screenshot checks: ~150 a day from October.
- "Everything else" (606) is the remainder, not a separate count: the second check on main, the re-arm and wake chains, release notifiers, and the real pull-request checks.
- Load on the last full day: about 126 machine-hours, with up to 42 jobs running at once.
What we changed
First we had to keep shipping. Within days our code was mirrored to our own Gitea server, a merge check ran on our own machine, and deploys ran from our own server again. That is its own story.
Then we fixed the cause, not just the symptom.
1. Switched it off. Ninety-six workflows were disabled across the organization: every merge sweep, every wake chain, release notifiers on timers, a fleet-wide reconciler, and the scheduled jobs of a large fork. Disabled, not deleted, so each one can come back on its own if it turns out to matter.
2. Removed it at the source. Switching off was not enough. The workflows were still in every repository, and the template new repositories are copied from still contained the sweep. Every new project would have brought the problem back. So we:
- removed the sweep from every template, and changed the script that creates new repositories;
- opened a pull request in each of 37 application repositories removing the sweep and its wake chain;
- made checks run once, on the pull request, not again after merging;
- made deploys run on the merge itself, instead of waiting for that second check.
3. Made the machine enforce it. A rule that lives in a document is forgotten the next time an agent solves a local problem. So the rule now lives in the merge check itself.
flowchart TD
P["Pull request"] --> C["One check"]
C --> M["Merge"]
M --> D["One deploy"]A pull request is refused if it adds a timer, adds a merge sweep, or makes a check run again after merging, unless its description says why in one line: schedule-ok: <reason>. A weekly data import is a fine reason. "Make sure nothing waits" is not.
Under the hood: the guard
The guard (workflow-guard.mjs in our forge's merge check) runs on every pull request before anything merges. It reads the list of files the pull request changes and looks only at the lines it adds to workflow files. It refuses three shapes:
- an added
schedule:orcron:line: a new timer; - a new workflow file whose name says auto-merge or sweep;
- a CI or smoke-check workflow that gains a
push:trigger: the same check again after merging.
The one escape hatch is a line in the pull request's description, schedule-ok: <why>, so every exception carries its reason where the next reviewer, human or agent, will read it. A pull request that changes only workflow files is recognised as such and skips the full test suite, which cannot exercise those files anyway.
The rule
All of this collapses into one sentence:
What we would tell anyone running agents in their repositories
- Count your runs. Per day, per workflow, against the number of real changes. If the ratio is climbing, something is waking itself up.
- Distrust timers. Almost every "check every N minutes" can be replaced by "act when something happens".
- Check each change once. If it passed on the pull request and nothing else changed, checking it again proves nothing.
- Put rules where the work passes through. Not in a document an agent may not read, but in the gate every change has to cross.
- Free is not the same as costless. Somebody pays. When it is not you, you stop seeing it, until the bill arrives in another form.
GitHub has not restored Actions for us yet. We have told them what we found and what we changed. Whatever they decide, we build differently now: less machinery, every piece of it explainable in one sentence, and a gate that keeps it that way.
bitbaum builds OrangeCat, Loki and Solon in public. If you run AI agents on real repositories and want to compare notes, or want to build with us, the door is open.
Discussion
Sign in to join the conversation.