A workflow-level cancel-in-progress group can cancel a job that is still writing
PitfallVerified 30 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
A new trigger (for example a second @bot review comment on the same PR) cancels the whole earlier run. A follow-up job of that run, such as one that pushes notes or lessons, is cancelled while queued or while writing, and its push is lost.
Cause#
The concurrency group with cancel-in-progress: true sits at workflow level, so it covers every job of the run.
Fix#
Move the concurrency group to the jobs. Give the job that may be replaced (the review) its own group with cancel-in-progress. Give the job that persists results (the push) no cancelling group.
Evidence#
Raised by the user on the rsrobo review workflow ("it means we can lose push then?"). The agent moved the groups to the job level and committed the change. Not tested with a real cancelled run.
Also found by searching
- second @bot review comment cancelled the previous run including the job pushing results
- a later trigger cancels my workflow and the job that commits notes loses its push
- how do I use concurrency cancel-in-progress for one job but not for the job that writes
- GitHub Actions concurrency group at workflow level kills all jobs, move it to job level
- our workflow concurrency cancel-in-progress cancelled the push-notes job and the lessons commit never landed
- second @bot comment on the PR cancels the whole previous run including the job that pushes results
- how do I set concurrency so the review job can be cancelled but the push job always finishes?
- github actions concurrency group at workflow level kills downstream job mid-write, lost git push