Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

Why GitHub Actions Cancels a Workflow Run and How to Diagnose It

A canceled GitHub Actions run may be explained by concurrency settings or conditions that remain true. Use the run timeline, workflow YAML, and job logs to determine what happened.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitHub Actions can cancel a run automatically because of concurrency settings, or a run may appear stuck canceling because a job or step condition remains true. To find the cause of a specific cancellation, check the run’s event and timeline, inspect workflow and reusable-workflow conditions, then use job logs—especially expression-evaluation output—as evidence.

Why GitHub Actions cancels a workflow run

The first configuration to check is concurrency. Runs or jobs assigned to the same concurrency group can affect one another: a new run may replace an existing pending run, and cancel-in-progress: true can cancel work already running in that group. Group names are case-insensitive. See GitHub’s concurrency documentation.

As an Amazon Associate I earn from qualifying purchases.

Check both workflow-level and job-level concurrency, and work out what the group expression resolves to for the event that triggered the run. Also inspect any configured queue behavior. If you need to preserve every run, verify the queue options supported by the workflow syntax you are using rather than assuming pending runs will all be retained.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Concurrency is not the only possible explanation. A cancellation may have been requested through the GitHub interface or API, while a job or step may also continue because of its condition. The run record, workflow YAML, and logs are needed to distinguish among these possibilities; the fact that a run is canceled does not, by itself, identify why.

Why a run can keep working after cancellation starts

Cancellation is staged, not instantaneous. GitHub re-evaluates conditions for running jobs. Jobs selected for cancellation receive a cancellation message, while a job whose condition still evaluates true can continue. GitHub then evaluates conditions for unfinished steps in jobs that are continuing. As a result, the interface can show cancellation activity even while a job or step remains active. The sequence is described in GitHub’s workflow cancellation reference.

Check always() and cleanup conditions

GitHub’s workflow troubleshooting guidance identifies always() as a common reason a job does not stop as expected: “A common cause can be using the always() status check function which returns true, even on cancellation.” Review conditions on running jobs and unfinished steps, including those in reusable workflows.

Do not replace every always() mechanically. It may be there to run cleanup that should happen even after cancellation. If a job should not continue once cancellation has been requested, GitHub’s troubleshooting guidance gives ${{ !cancelled() }} as an alternative pattern. Choose based on the intended cleanup behavior, then confirm the expression’s actual result in the logs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand cancellation timing and side effects

For a step selected for cancellation, the runner first interrupts its entry process. GitHub documents escalation to a termination signal if the process has not exited after 7,500 milliseconds, followed by a further 2,500 milliseconds before the process tree is killed. The server forcibly terminates jobs and steps still marked for cancellation after a five-minute cancellation timeout. These are documented platform timings, not a guarantee that every child process or external side effect is immediately rolled back.

How to diagnose a specific canceled run

  1. Open the run summary. Record the triggering event, branch or ref, start time, status, and whether another run started around the same time. The run page shows status and job and step activity. GitHub’s workflow run history documentation explains how to review runs.
  2. Inspect the workflow configuration. Review the workflow YAML and any reusable workflow it calls. Look for workflow- and job-level concurrency, group expressions, cancel-in-progress, queue, and if conditions on running jobs and unfinished steps. Compare the configuration with the event and ref recorded for the run.
  3. Read the affected job’s logs. Open the job in the run and inspect its logs; download the log archive if needed. For unexpected job-condition behavior, inspect system.txt in the archive. Its Evaluating, Expanded, and Result lines show how an expression was evaluated and which runtime values it used.
  4. Add debug detail if ordinary logs are not enough. GitHub CLI supports gh run rerun RUN_ID --debug; to rerun only failed jobs with runner and step debug logging, use gh run rerun RUN_ID --failed --debug. See the debug logging documentation and CLI rerun reference. A rerun is a new diagnostic action; it does not prove what caused the original run to be canceled.
  5. Check the applicable runtime limit. GitHub’s usage limits documentation states that each job on GitHub-hosted runners can execute for up to six hours. Confirm that the run used a GitHub-hosted runner and check the current limit before attributing a cancellation to duration.

Choose the right response: diagnose or stop the work

Goal Use What it can establish or do
Find out why the run stopped Workflow YAML and reusable workflow configuration Shows configured concurrency groups, cancellation settings, and job or step conditions.
Reconstruct what happened Run summary and timeline Shows the run’s status and sequence of job and step activity.
Verify condition behavior Job logs and system.txt Shows expression evaluation, expanded values, and results; debug logging can add runner and step detail.
Stop a run that is not responding Normal cancellation first; force cancellation only if it fails Normal cancellation follows the standard path. Force cancellation is an escalation that bypasses conditions such as always().

Escalate to force cancellation only when needed

If cancellation through the normal interface or API does not finish, review the conditions first. GitHub documents a force-cancel endpoint for runs that do not respond to standard cancellation; it bypasses conditions such as always(). Follow the force-cancel API reference for the exact request and required permissions. The cited fine-grained token requirements include Actions repository write permission. Force cancellation is a way to stop a run, not an explanation of why it remained active.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the evidence can—and cannot—tell you

A concurrency configuration can explain why one run replaced a pending run or why in-progress work in a group was canceled. Condition-evaluation logs can explain why a job or step continued during cancellation. A run timeline can establish when activity occurred. For a particular run, use these pieces together: no general rule can identify its cause without the run’s configuration, event, chronology, and logs.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.