Skip to content
Latchkey

CircleCI "Build was canceled" - Superseded by a Newer Commit

When auto-cancel of redundant workflows is on, pushing a newer commit to the same branch cancels the in-progress workflow for the older commit. The cancellation is expected behavior, not a failure of your code.

What this error means

A running workflow shows canceled with a note that it was superseded by a newer commit on the same branch.

circleci
Build was canceled. A newer commit on branch feature-x superseded
this workflow (auto-cancel redundant workflows is enabled).

Common causes

Newer push on the same branch

Auto-cancel stops the older in-progress workflow when a newer commit arrives.

Rapid successive pushes

Frequent pushes cancel earlier runs by design.

How to fix it

Re-run the latest commit if needed

The latest commit workflow runs; re-run it if you canceled intentionally.

  1. Confirm the newest commit workflow is the one running.
  2. Re-run the workflow for the latest commit if it was also canceled.
  3. Disable auto-cancel for protected branches if every commit must build.

Adjust auto-cancel scope

  1. Open project settings then Advanced.
  2. Disable auto-cancel for branches where every commit must build.
  3. Leave it enabled for fast-moving feature branches.

How to prevent it

  • Expect older workflows to cancel when you push again quickly.
  • Disable auto-cancel on branches that must build every commit.
  • Watch only the head-commit workflow for status.

Frequently asked questions

What causes CircleCI "Build was canceled"?
There are 2 common causes: newer push on the same branch and rapid successive pushes. Auto-cancel stops the older in-progress workflow when a newer commit arrives.
How do I fix CircleCI "Build was canceled"?
There are 2 fixes depending on which cause you have: re-run the latest commit if needed and adjust auto-cancel scope. Work through them in order, since the first is the most common.
What does CircleCI "Build was canceled" actually mean?
A running workflow shows canceled with a note that it was superseded by a newer commit on the same branch.
How do I stop CircleCI "Build was canceled" happening again?
Expect older workflows to cancel when you push again quickly. The prevention section lists 3 changes that keep it from recurring.

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card