Skip to content

Stories

My worst week of unattended Claude Code

Published · 5 min read·

A small robot on a stepladder sets one more block on top of a leaning tower whose bottom block is cracked, while a second robot kneels and pushes a tiny wooden wedge under it.

In short

  • 54 merges by my unattended Claude Code setup left main's CI failing. 21 of them came on one day, 13 November 2026.
  • My merge check looked only at the pull request. Until 18 November, nothing held a merge while main was red.
  • I added three rules: merge main into a branch before review, order parallel pull requests that touch the same files, and hold every merge while main is red.
  • The hold is the one I would keep. It can't stop the first failure, but it stops the pile-up on top.

My unattended Claude Code agents went most wrong on 13 November 2026: 21 of their merges left main's CI failing that day. The model wrote what it was asked to write. My merge rules held nothing while main was red, and that part is on me.

This happened in Issuemill, the setup that runs Claude Code on my GitHub issues while I sleep. Running Claude Code unattended on GitHub issues explains the whole loop. This post is about the week it bit me.

What happened?

On 13 November the engine had its busiest day so far: 57 issues merged, and $616 spent at API list prices. 21 of that day's merges left main failing.

One honest limit: my records of main's CI only begin on 12 November, so this is the worst stretch I can see. Over the whole run so far, main went from passing to failing after an agent's merge 38 times, and 54 merges left it failing.

The run records name the causes. Here are five, without the private project names:

  • Two pull requests that each passed alone. One app got two features at the same time. Both added a section to the same page and rewrote the same four text keys in 9 languages. The first merged while the second waited for CI, and the second could no longer merge cleanly.
  • Two runs fixing the same flaky test. One fixed it on main while the other's pull request was still waiting for CI. The result was a conflict, and a second review of a fix that was already in.
  • A two-file version bump that went red four times. Each time, a different flaky browser test failed. Each pipeline took about 25 minutes. The release it was waiting for shipped without it.
  • A red build called noise. The merge loop restarted a red pipeline, guessing a server hiccup. The real failure was the secret scanner, which had flagged a fake key in a test.
  • A test that only passed on a developer machine. It checked a formatted date. With British dates it passed. On CI, with American dates, it failed.

None of these is dramatic alone. Together, on a day with 57 merged issues, they made a mess.

What did it cost?

Money: from 13 to 20 November the engine spent $4,526 at API list prices. I pay with a Claude subscription, so that is what the same work would cost through the API, not my bill. To be fair to the agents, the same week also merged 556 issues, and the three busiest days the engine has ever had are in it. My worst week was also my most productive one, which says something about counting only output.

Time: the daily retro reads each day's runs and writes down where time went. It logged the most lost time on 15 and 16 November: 2,362 and 3,105 minutes. Those are its own estimates, added up across runs working in parallel, so they are much more than the hours in a day. Over the whole old engine, the biggest losses it logged were slow implementer work (2,615 minutes), reviews sent back (2,049) and waiting for CI (1,309).

Undo: nothing was reverted. The only revert merged in all my repositories from 6 November to 1 December undid a change the engine did not make. Every red main was fixed forward, with more pull requests, which the queue then had to fit in between everything else.

The week also ended badly in its own way. On 20 November the engine spent $255 and not one issue merged that day. After that it stayed off until 27 November: the engine paused itself at 90% of the account's weekly quota until it reset on 24 November, and then a $0 daily limit kept it off. Turning everything off for a week is the most expensive fix there is, and also the only one that never fails.

Why did my rules allow it?

My merge check looked only at the pull request. The reviewer had passed this commit, and CI on this pull request was green, so code merged it. It never asked what state main was in.

That works when one change lands at a time. It falls apart when many runs work in parallel:

  • a pull request's CI tested the branch as it was, while main kept moving underneath it;
  • two runs could touch the same files, and nothing put them in order;
  • once main was red, nothing stopped the next green pull request from merging.

The day before, on 12 November, I had added a rule: each run merges main into its branch before every review round, so the reviewer judges what will actually merge. That helped the review. It did nothing for all the other pull requests waiting for CI at the same moment.

What did I change?

Three rules. The first two went into the lead's instructions; the third is code:

  1. 12 November: merge main into the branch before every review round. It was already there, and it was not enough alone.
  2. 13 November: order parallel pull requests that touch the same files.
  3. 18 November: hold every merge while a repository's main is red, until the fix for main lands. The merge loop now checks main before it merges anything.

If I could keep only one, it would be the third, because code runs every time and a prompt is only read. It can't stop the first red, because any merge can still break main. What it stops is the pile-up on top. A few merges still slip through: the rule only sees that main is failing once main's tests finish, and a merge can land while they are still running.

The retro also wrote down a lesson about the "noise" restart: read the failing step's log before calling a red pipeline flaky. The reviewer's side of this story, and why it never merges without CI, is in An AI reviewer as my merge gate.

What would I still not trust it with?

  • Deciding that a red pipeline is "just flaky". That week it guessed wrong more than once. A restart is cheap. A wrong guess on main is not.
  • Anything a revert can't undo. Deleting data, rotating a secret, messaging customers. My rules make an agent ask me first, and I would keep that even if it never once got it wrong.
  • A busy main with many runs in parallel and no hold. The rule is boring. The week without it was not.

What I took from it: an agent that does exactly what your rules allow will find every gap in them, and it will find them fast, on your busiest day.

Get the next post by email

A short email when a new post is out or something ships. Confirm once by email, unsubscribe in one click.

All posts