Skip to content
Latchkey

GitHub Actions Matrix fail-fast Cancels Passing Sibling Jobs

Healthy matrix legs are cancelled because strategy.fail-fast defaults to true. When any leg fails, GitHub cancels the rest of the in-progress matrix, hiding whether the others would have passed.

What this error means

One matrix combination fails and the others show "cancelled" rather than running to completion, so you cannot tell which versions or platforms actually passed.

.github/workflows/ci.yml
strategy:
  matrix:
    node: [18, 20, 22]
# node 18 fails -> node 20 and 22 are cancelled (fail-fast default true)

Common causes

fail-fast defaults to true

A matrix cancels all in-progress legs as soon as one fails. This saves minutes but obscures the full pass/fail picture across the matrix.

Wanting full results during debugging

When triaging a flaky or version-specific failure, cancelled siblings give no signal about whether they would have passed.

How to fix it

Disable fail-fast to see every leg

Set fail-fast: false so each combination runs to completion independently.

.github/workflows/ci.yml
strategy:
  fail-fast: false
  matrix:
    node: [18, 20, 22]

Choose per pipeline

  1. Keep fail-fast: true to fail quickly and save minutes on large matrices.
  2. Use fail-fast: false for compatibility matrices where you need every result.
  3. Combine with max-parallel to bound concurrency when fail-fast is off.

How to prevent it

  • Set fail-fast: false for compatibility matrices that need full coverage.
  • Keep fail-fast: true to save minutes when fast feedback matters most.
  • Document the choice so cancelled legs are not mistaken for failures.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →