Skip to content
Latchkey

Fail-Fast vs Continue-on-Error: Controlling How CI Stops

Fail-fast stops the moment something fails, to save time. Continue-on-error pushes through a failure to gather more information. They answer opposite questions - and apply at different levels.

These two settings shape how a pipeline reacts to failure: bail early for speed, or keep going for completeness. They operate at different scopes, and mixing them up leads to either wasted minutes or hidden failures.

Fail-fast (matrix/strategy level)

Fail-fast cancels the remaining parallel jobs as soon as one fails. It saves minutes when any failure means the whole change is bad. The downside: you only learn about the first failing combination, not whether the bug is specific to one OS or version. Disable it when you want the full pass/fail grid.

Continue-on-error (step/job level)

Continue-on-error marks a step or job so its failure does not fail the run - the pipeline keeps going and reports overall success. It is for non-critical or informational steps (an optional linter, an experimental matrix leg) where you want the result recorded but not gating.

Non-gating step
- run: ./optional-linter.sh
  continue-on-error: true

They are not opposites of each other

A common confusion: fail-fast governs whether *sibling jobs* get cancelled on a failure; continue-on-error governs whether a *specific step/job’s* failure counts against the run. You can disable fail-fast (run all combinations) and still have some steps gate while others do not.

Choosing

  • Use fail-fast when any failure invalidates the whole change (fast feedback).
  • Disable fail-fast when you need to see every combination’s result.
  • Use continue-on-error for genuinely optional, informational steps only.
  • Never use continue-on-error to paper over a step that should actually gate.

Key takeaways

  • Fail-fast cancels sibling jobs on the first failure to save time.
  • Continue-on-error stops a step/job failure from failing the whole run.
  • They operate at different scopes - not inverses of each other.
  • Continue-on-error is for optional steps, never to hide a real gate.

Related guides

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