New run cancels previous - concurrency group overlap
Previously in-progress workflow shows 'Cancelled' when a new push arrives
Focused incident mode — strips away everything but this runbook.
Symptoms
- Previously in-progress workflow shows 'Cancelled' when a new push arrives
- Deployment of the older commit is aborted in favor of the new one
- Concurrent runs on the same branch keep cancelling each other
Evidence to grab
Collect these artifacts before you change anything — they prove (or rule out) each cause.
Concurrency block in the workflow
cat .github/workflows/<file>.yml | grep -A5 'concurrency'Run cancellation history
gh run list --repo <OWNER/REPO> --status cancelled --limit 5
Diagnostic flow
Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.
Guided decision tree is ready.
Steps with commands, expected output, and pass/fail branches.
Ranked root causes
Evidence checklist
- A test/lint workflow has cancel-in-progress: true
- Multiple PRs cancelling each other's test runs
Confirm before fixing
cat .github/workflows/<file>.yml | grep -A5 'concurrency'Confirm cancel-in-progress setting
Fix
sed -i 's/cancel-in-progress: true/cancel-in-progress: false/' .github/workflows/<file>.ymlDisable cancel-in-progress for non-deploy workflows
Resolution runbook
Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.
cat .github/workflows/<file>.yml | grep -A5 'concurrency'Read the concurrency configuration
gh run list --repo <OWNER/REPO> --status cancelled --limit 5Confirm which runs were cancelled
sed -i 's/cancel-in-progress: true/cancel-in-progress: false/' .github/workflows/<file>.ymlDisable cancellation if needed
Prevention
- Only use cancel-in-progress: true for deploy workflows, not for tests or lints.
- Include github.ref in the concurrency group name to scope cancellation to the branch.
- Document which workflows use cancellation and why.
Related runbooks
Same stack, same failure family — worth a skim.
Workflow runs show 'Queued' status for many minutes before starting
Push to main does not trigger any workflow run
Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.