# Breaking Ceph on purpose: letting Claude Code run my test-and-fix loop

DevFeed: [Breaking Ceph on purpose: letting Claude Code run my test-and-fix loop](<https://devfeed.tech/articles/breaking-ceph-on-purpose-letting-claude-code-run-my-test-and-fix-loop-127393.md>)

Original publisher: [Read original article](<https://ceph.io/en/news/blog/2026/claude-code-test-and-fix-loop/>)

Author: Alex Ainscow (wocsnia@gmail.com)

Published: 2026-11-10T00:00:00Z

Content type: opinion

Language: en

Sources: [Ceph Blog](<https://devfeed.tech/sources/ceph-blog.md>)

Topics: [ceph](<https://devfeed.tech/topics/ceph.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [human in the loop agent](<https://devfeed.tech/topics/human-in-the-loop-agent.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Code review](<https://devfeed.tech/topics/code-review.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>), [ai code review](<https://devfeed.tech/topics/ai-code-review.md>), [AI Context Management](<https://devfeed.tech/topics/ai-context-management.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [Process](<https://devfeed.tech/topics/process.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [ceph](<https://devfeed.tech/tags/ceph.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [code](<https://devfeed.tech/tags/code.md>), [en-article](<https://devfeed.tech/tags/en-article.md>), [en-blog-post](<https://devfeed.tech/tags/en-blog-post.md>), [erasure-coding](<https://devfeed.tech/tags/erasure-coding.md>), [rados](<https://devfeed.tech/tags/rados.md>), [recovery](<https://devfeed.tech/tags/recovery.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>)

## AI overview

Claude Code ran a human-steered fault-injection and test-and-fix loop against Ceph: it injected faults, diagnosed failures, wrote unit tests that had to fail before fixes, and iteratively improved the test tool. The first two sessions found 50 defects; ten later runs found five more, for 55 total, including 32 in code already on main. The author reports that over 90% of fixes were sound, but every change still required human understanding and review. The first campaign cost about $840 in API use; the author estimates human effort fell from roughly two person-days to a couple of hours per bug. The account emphasizes evidence capture before reruns erase the cluster, controls for false alarms and tool defects, and human approval for design choices and anything filed or published. It also describes operational failures, including missed alerts and full disks, and gives a sample command and prerequisites for running the fault injector.

## Source excerpt

Between 29 September and 12 October 2026 I let Anthropic's Claude Code run a whole test-and-fix loop on upstream Ceph while I steered. The loop: inject faults into a test cluster, notice when something breaks, work out why, turn it into a unit test that fails, fix it, rebuild and go again. When the test tool itself was wrong, it fixed that too, so the tool kept getting better as the runs went on. The first two long sessions (87 hours of Claude Code work, one overnight, one over a weekend) found 50 real defects. 27 were in code already upstream, the oldest dating back to Octopus (2020). A later batch of ten runs found five more on main. It was not cheap. The first two sessions cost about $840 at API prices, and every fix still needed a person to understand and review it. Even so, I think it cut the human time per bug from about two days to a couple of hours. The bug count is useful, but what really impressed me was the quality and usability of the fixes. Why I wanted this ¶ I write Ceph code for IBM and Red Hat, working on erasure coding. This year that has meant optimized EC, and now erasure-coded pools that span two data centres, so a pool survives the loss of a whole site (the multi-zone work). The bugs that matter in this code show up only when something fails at the wrong moment. An OSD dies mid-write. A site drops out while recovery is running. A PG merge waits behind a backfill reservation. Unit tests miss these sequences unless someone already knows what to look for. Ceph's integration tests (teuthology) do kill OSDs, but each run takes hours. Getting from a failed job to an understood bug with a test can then take a developer days. I wanted the whole cycle on one machine, running while I slept. The loop at a glance ¶ Claude Code runs all seven steps, round and round, for as long as the runs go. My part is the two dashed boxes: the direction, and a yes or no on everything that leaves the machine. Steps 4 to 6 often ran in helper agents, so the runs did not ha