Complete AI Training
Sign inGet my AI kit

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI agent for devops engineers

Flaky Test Quarantine Agent

A trustworthy pipeline where flaky tests are measured, fixed or quarantined with an owner

Flaky Test Quarantine Agent: what goes in, what the agent does and what you get

What it does

When a pipeline fails for no clear reason, developers just rerun it and stop trusting red builds. This agent reads recent CI history, finds tests that pass and fail on the same code, and reruns each suspect many times to measure its flake rate. It looks for shared causes: timing, test order, shared data, network calls or a slow machine. It then proposes either a fix or a quarantine, which moves the test into a separate non-blocking run with an owner and a deadline. After the change it reruns the test to confirm the fix removed the flake. The engineer approves merges. Edge case: a test that fails the same way every time is a real failure, not a flake, and is left alone.

How it works

Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.

Start and resultWhat it doesA check on its own workWaits for your OKGoes back and retries
Yes, continueApprovedYes, continueNoNo 1 STARTS WHEN Nightly review of CI history 2 USES A TOOL Find tests with mixed results on the same commit 3 USES A TOOL Rerun each suspect 20 times to measure its flakerate 4 CHECKS THE RESULT Does the test fail intermittently and not everytime? If not: drop it from the flaky list and report it as areal failure. Back to step 3. 5 DOES Look for shared causes such as timing, order, shareddata or network 6 DOES Propose a fix or a quarantine with an owner anddeadline 7 YOU APPROVE Engineer approves the merge 8 USES A TOOL Rerun the test 20 times after the change 9 CHECKS THE RESULT Is the flake rate now below the limit? If not: try the next cause or quarantine the test. Backto step 5. 10 RESULT Flaky test report and quarantine list
Read the steps as a list
  1. Nightly review of CI history
  2. Find tests with mixed results on the same commit
  3. Rerun each suspect 20 times to measure its flake rate
  4. Does the test fail intermittently and not every time?If not: drop it from the flaky list and report it as a real failure. Back to step 3.
  5. Look for shared causes such as timing, order, shared data or network
  6. Propose a fix or a quarantine with an owner and deadline
  7. Engineer approves the mergeThe agent waits here for your OK.
  8. Rerun the test 20 times after the change
  9. Is the flake rate now below the limit?If not: try the next cause or quarantine the test. Back to step 5.
  10. Flaky test report and quarantine list

How it decides

A test is flaky when it fails and passes on identical code. Quarantine applies above a flake rate; a cause that is found is fixed instead.

  • Call a test flaky above a 2 percent failure rate on unchanged code
  • Quarantine at 10 percent or higher if no fix is found
  • Set a 14-day deadline for each quarantined test
  • Never quarantine a test that fails on every run

Make it yours

Every agent is a starting point. You choose these settings for your own situation.

  • Reruns per suspect (default 20)
  • Flake rate that triggers action (default 2 percent)
  • Quarantine deadline (default 14 days)
  • Code owners to assign

What keeps you in control

It always asks you first

  • Merging a fix or a quarantine change

Hard limits

  • Never deletes tests
  • Never merges a change without approval

It stops when

  • Done: all flaky tests are fixed or quarantined with owners
  • Stop: CI history is too short to judge

Set it up

We guide you through the set-up, step by step

Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.

10 minto set it up in your AI
5 AIsChatGPT, Claude, Copilot, Gemini, Grok
  • One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
  • The agent then walks you through connecting your own data, one source at a time
  • A downloadable copy with the flow chart, the rules and the full guide
Get access to this agent

An example run

What happensThe agent found 9 tests with mixed results over 2 weeks. Reruns showed a checkout test failing 6 of 20 times. A timing issue appeared when it ran after a database reset. The agent proposed a wait for readiness. After the engineer merged it, 20 reruns passed 20 times. A login test failing 20 of 20 times was reported as a real failure.

More agents for devops engineers