Skip to content
Latchkey

GitHub Actions matrix fail-fast cancels healthy sibling jobs unexpectedly

A matrix runs each combination as an independent job, but strategy.fail-fast is true by default. The first job that fails triggers cancellation of every other in-flight matrix job, so green legs show up as "Cancelled".

What this error means

One matrix leg fails and the rest of the matrix immediately flips to Cancelled even though those legs were passing.

github-actions
build (node-18)   failure
build (node-20)   cancelled
build (node-22)   cancelled
The strategy configuration was canceled because "build (node-18)" failed.

Common causes

strategy.fail-fast defaults to true

When unset, a single failing leg cancels all sibling legs in the same strategy block.

A flaky leg poisons the whole matrix

One intermittently failing combination cancels otherwise-passing combinations, hiding their real result.

How to fix it

Disable fail-fast to let every leg finish

  1. Set strategy.fail-fast: false so legs run to completion independently.
  2. Keep it true only when you intentionally want fast cancellation on first failure.
.github/workflows/ci.yml
jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        node: [18, 20, 22]
    runs-on: latchkey-small

Quarantine the flaky leg instead

  1. Add continue-on-error to the specific flaky combination via matrix include.
  2. This keeps fail-fast for genuine failures while tolerating the known-flaky leg.

How to prevent it

  • Decide fail-fast intent explicitly per job rather than relying on the default.
  • Use fail-fast: false on broad compatibility matrices where every result is useful.

Frequently asked questions

What causes "fail-fast cancels siblings"?
When unset, a single failing leg cancels all sibling legs in the same strategy block.
How do I fix fail-fast cancels siblings?
Disable fail-fast to let every leg finish

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card