Flaky tests are a tax on every PR

You hit re-run. Your coding agent hits re-run. Nobody fixes the test, and your team learns to ignore a red build. Drape turns a flaky test into a fixed one.

Watch · 1 minute

See a flaky test go from first flake to proven fix

A coupon test fails and passes on the same commit. Drape flags it, quarantines it, finds the commit that made it flaky, and proves the fix with 50 green runs. Captions are on screen, so it works muted.

Read the transcript

Flaky tests waste your team's time, and your AI agents' time too.

This coupon test failed, then passed on retry, on the same commit. It's flaky, not your change.

Drape flagged it the day it turned flaky, and counts the CI time it's wasting.

To unblock your pull requests while it gets fixed, you can quarantine it. Give it a reason, an expiry, and a ticket, and it keeps running without blocking anyone.

Then find out what broke it. Drape reruns the test across your recent commits, and names the change that made it flaky.

Through Drape's MCP server, Claude Code or Codex learns the failure is a flake, reads the test's history, and goes straight to the fix.

Once the fix lands, burn it in. Fifty runs, fifty passes, so you know it's fixed, not just lucky.

Lift the quarantine, and main stays green, for real this time.

Drape. The CI brain.

Why teams live with the problem

“Just rerun it”

The default response to a flaky test. It feels fast in the moment, but it normalizes unreliable CI. Developers stop investigating failures and start treating every red build as noise.

“It's not a priority”

Flaky tests are hard to prioritize because no single flake is catastrophic. Added up, they cost hours every week. Without a number for that cost, the fix never makes it onto the roadmap.

“We'll fix it later”

Later never comes. Flaky tests accumulate, CI gets slower, and the test suite becomes something teams endure rather than trust. By the time it's a crisis, fixing it is a multi-quarter project.

What happens when CI loses trust

// agent run #1
test failed → retry
test failed again → retry
punted to human — no signal

Your AI agents learn the habit too

An agent that sees a test fail and then pass on a rerun moves on. Without flake history it can't tell a flaky failure from a real one, so it retries blindly or punts back to a human.

deploy_staging 47% retry · 3.2h/wk
build_assets 31% retry · 1.8h/wk
smoke_test 28% retry · 1.4h/wk

Nobody knows where the CI time goes

Retries, queue wait, flakes: without a breakdown, nobody can see which one is eating your CI time, so the fix that saves the most hours never gets built.

Queue depth 12 PRs
Avg merge time 4.2h (was 0.5h)
CI runs per PR 2.7

Merge queues become bottlenecks

Every PR waits for reruns, so features that should ship in hours take days.

test_checkout_total Failed
→ “probably flaky” Re-run
→ merged Real bug

Real failures get written off

Once a red build is usually noise, people rerun failures before reading them, and the real bug gets written off as “probably flaky” too.

From the first flake to a proven fix

One flaky coupon test in a demo storefront, from the day it turned flaky to the day main went green for good. Every screen is the Drape product.

Detect

Flag it the first time it flakes

A test that fails, then passes when the same commit runs again, is flaky. It isn’t your change. Drape flags it the day it happens, scores how often it flakes on your default branch, and counts the CI time it costs.

Drape's test grid: test_applies_stacked_coupons fails and then passes on the same commit, twice in five days

Unblock

Quarantine it, with an expiry

Give it a reason, an expiry date and a ticket. The test keeps running, but it stops blocking pull requests while it gets fixed. Drape calls this a suppression, and it works for flaky CI jobs too.

  • Suppress on main only, on feature/*, or everywhere
  • Suppressions end on their expiry date unless someone renews them
  • Anything suppressed for 30+ days with no progress gets flagged
The test's page in Drape: a 10% flakiness rate, a worsening trend, and a notice that the test has been suppressed

Find the cause

Find the commit that made it flaky

Drape reruns the test across your recent commits and names the change that introduced the flakiness, so nobody walks the history by hand.

A Drape bisect across six commits names 361b238f, 'Cache coupon lookups per request', as the commit that made the test flaky

Fix

Your agent fixes it instead of re-running it

Through Drape’s MCP server, Claude Code, Cursor or Codex asks whether a red build is a real bug or a flake, and reads the test’s history, so it goes straight to the fix.

~/acme/storefront $ claude
> CI is red on main. Is it my code? Fix it.

● drape · triage_ci(repo="acme/storefront")
  test_applies_stacked_coupons: flaky, not your change
● drape · get_test(test="test_applies_stacked_coupons")
  flaky on 10% of main commits · trend worsening
  assert Decimal('42.50') == Decimal('37.50')

● Reading src/storefront/cart/coupons.py
  The coupon cache is shared across carts, so a
  stacked cart reads another cart's lookup.

- _cache[code] = lookup(code)
+ _cache[(cart.id, code)] = lookup(code)

Prove

Prove the fix with 50 green runs

Once the fix lands, burn it in: Drape runs the test 50 times on the same commit. Fifty passes means it’s fixed, not lucky. Lift the quarantine, and main stays green.

A Drape burn-in of test_applies_stacked_coupons: 50 of 50 runs passed, and the test appears stable

Stop re-running flaky builds.

14-day free trial. No credit card required.