PromptTesting and qualityClaude Code, Codex, Cursor and other coding agents

Flaky-test hunt

Finds tests that pass and fail at random and fixes the root cause instead of retrying them.

How each pass goes
  1. Run the suite many times to find unstable tests.
  2. Pick one and find why it flips (timing, order, shared state).
  3. Fix the cause and rerun to prove it is stable.
Stops when
The test passes on every one of many runs.
Starter prompt
Run the test suite 20 times and list tests that both passed and failed. Take the worst one, find the root cause (timing, ordering, shared state, network), fix it without adding retries or sleeps, then rerun it 20 times. Repeat for the next flaky test.
Paste into Claude Code, Codex or Cursor. To keep it running unattended, wrap it in /goal or the Ralph loop.