# How to use Claude to fix flaky CI tests

An engineering leader gave Claude CI artifact access and pass-rate tooling, let it investigate and rerun flaky tests overnight, and reviewed its proposed fixes during the day.

Agent: Claude (via Claude Code)
Tools: Claude, CI artifacts, Pass-rate monitoring tools
Category: Software & DevOps
Date: 2026-05-01

Outcome: The leader reports removing 20 minutes from the CI pipeline and improving pass rate by 35% in a handful of weeks; the source does not specify how that percentage was calculated.

## Steps

1. Built tooling to monitor 30 days of rolling CI pass and fail rates.
2. Identified the worst flaky tests and formed failure hypotheses.
3. Used divide-and-conquer investigation to seek minimal reproductions.
4. Proposed fixes and reran tests overnight when deterministic reproduction failed.
5. Reviewed proposed pull requests and discarded bad solutions.

Human oversight: The leader reviewed PR proposals between meetings and explicitly discarded some bad solutions.

Source: [SeanAnderson on Hacker News](https://news.ycombinator.com/item?id=47970174)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-fix-flaky-ci-tests/
