# Why does GitHub Actions say "The operation was canceled"?

"The operation was canceled" means something told the job to stop: a person, a newer run, a failed matrix leg, a timeout or the runner. How to tell which.

By Grant Unwin, published 2026-11-16. Checked against GitHub's documentation on 2026-11-16. The web page: https://www.runners.io/blog/github-actions-the-operation-was-canceled

“The operation was canceled” is what a step logs when something told the job to stop: a person, a newer run in the same concurrency group, a failed sibling in a matrix, a timeout, or the runner shutting down. Beside it, “The runner has received a shutdown signal” says the runner itself was stopped. GitHub gives a cancelled step 7.5 seconds to exit after SIGINT and 2.5 more after SIGTERM, and forcibly ends anything still running after 5 minutes.

**In short**

- "The operation was canceled" is the step's line when the job was told to stop. It does not say by whom.
- "The runner has received a shutdown signal" often sits beside it, and reports show the runner's log saying UserCancelled where nobody pressed Cancel.
- GitHub sends SIGINT, then SIGTERM after 7.5 seconds, kills after 2.5 more, and ends everything left after 5 minutes.
- Check in order: a person, a shared concurrency group, a failed matrix leg, a timeout, a stopped runner.
- A cleanup step with if: cancelled() or always() has up to 5 minutes to finish.

The message does not say which cause it was, and people reading it often assume the wrong one. This post covers what GitHub does when it cancels a job, the five causes in the order to check them, how to read a run to tell them apart and how to make a cancelled job clean up after itself. The cancellation rules are from GitHub’s documentation, read on 15 November 2026; the log lines are from reports in GitHub’s runner repositories.

## What do “The operation was canceled” and “The runner has received a shutdown signal” mean?

They are two lines of one event. In a report on the runner repository, [issue 2468](https://github.com/actions/runner/issues/2468), a user pasted a log that ends with “The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.” and, as the next line, “The operation was canceled.” The first is the runner saying why it is stopping, and the second is the step that was running when it did. In that report the two lines come together; in other reports on the same repository the second appears alone.

Neither line says who sent the signal. In the same issue, and in [a later report on the runner images repository](https://github.com/actions/runner-images/issues/13263), the runner’s own diagnostic log says “Runner will be shutdown for UserCancelled” while the people reporting say nobody had pressed Cancel. In the second, the reporters disagree about the cause: one points to a `cancel-in-progress: true` concurrency setting, and says no other run was in progress when it fired. So the line does not tell you that a person cancelled, or that a concurrency group did.

## What does GitHub do when it cancels a job?

The server first checks every running job’s `if` condition again. A job whose condition is still true, such as `if: always()`, keeps running, and a job with no condition is treated as `if: success()`. For each job that is to stop, the server sends a cancellation message to its runner.

On the runner, each step that has to stop is sent SIGINT, or Ctrl-C on Windows, at its entry process: node for a JavaScript action, docker for a container action and the shell for a `run` step. If the process has not exited within 7,500 milliseconds the runner sends SIGTERM, waits 2,500 more and then kills the process tree. Whatever is still running five minutes after the cancellation started is forcibly terminated by the server. A cleanup step that takes ten seconds can finish inside that window and one that needs ten minutes cannot.

## Which cause is yours?

| Cause | What points to it | The change |
| --- | --- | --- |
| A person or a script cancelled the run | The run is marked cancelled and the jobs in it stop together | Ask who pressed Cancel; stop a script that cancels |
| A newer run in the same concurrency group | cancel-in-progress: true on a group that several workflows or events share | Narrow the group, or cancel only pull request runs |
| A matrix leg failed | fail-fast, which defaults to true, cancels the other legs | Set fail-fast: false to let every leg finish |
| A timeout | timeout-minutes on the job, or a job's execution limit | Raise the timeout, or split the job |
| The runner stopped | A shutdown signal in the log; on a self-hosted runner, a stopped service | Check the runner service, or the memory the job used |

**A person or a script.** The quickest check is the run itself: a run that someone cancelled by pressing Cancel workflow, the button GitHub’s [documentation on cancelling a run](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/cancel-a-workflow-run) names, stops every job in it together. GitHub’s permissions table says `actions: write` permits an action to cancel a workflow run, so a workflow or script that holds it can do the same; if the cancellations come at the same time every day or on every push, look for one.

**A concurrency group that is too wide.** With `cancel-in-progress: true`, a newer run in the group cancels the one already running. GitHub says the group can be any string, so two workflows that name the same group, or a group built only from the branch name shared by push and pull request runs, cancel each other. A report on a merge queue shows the symptom as an annotation that begins “Canceling since a higher priority waiting request for” and names the group. You can make the setting conditional: `cancel-in-progress` accepts an expression, so only pull request runs are cancelled.

```yaml
concurrency:
  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
```

**A failed leg of a matrix.** A matrix’s `fail-fast` defaults to true, so when any job in it fails GitHub cancels the others that are running or queued. Those jobs are cancelled although nothing in them failed. If you want every leg’s result, set `fail-fast: false`; if you want the fast failure, the cancelled legs are working as designed and the failed leg is the one to read.

**A timeout.** `timeout-minutes` is the number of minutes GitHub lets a job run before it cancels it, and its default is 360. On GitHub-hosted runners a job also stops at its execution limit, 6 hours, or 15 minutes on the single-CPU runner, which the [limits post](https://www.runners.io/blog/github-actions-limits) lists with every other limit; GitHub says a job that reaches its execution limit is terminated and fails. A job whose last step ended at one of these times points to a timeout. On our runners a job may run for 60 minutes, and the job page says “We stopped this job because it ran longer than your plan allows”, or “longer than a single job can run here” when our runner stopped it first, within a quarter of an hour of the limit, as the [limits page](https://www.runners.io/docs/runners/limits) explains.

**The runner stopped.** The shutdown-signal line is the one that points here. On a self-hosted runner the message itself says the runner service was stopped or a manually started runner was cancelled. On a hosted runner, a contributor answering a report on the runner images repository wrote on 5 November 2026, in a report with exactly these two lines and no exit code, that a job above its RAM plus swap lost the runner “with the same shutdown message”, because the machine stops responding before an out-of-memory line reaches the log ([runner-images issue 15202](https://github.com/actions/runner-images/issues/15202)). The post on [out-of-memory kills](https://www.runners.io/blog/github-actions-runner-out-of-memory) covers how to measure a job’s peak. Check that before the others if the last lines of the log show a build at its most memory-hungry.

## How do I read a run to tell them apart?

Start with timing. Open the run, find the step that was cancelled and note how long the job had run. A job that stopped at a round number of minutes suggests a timeout. A job cancelled the moment another run started suggests a concurrency group, and the other run is in the Actions list at that time. A set of legs that ended together right after one failed suggests `fail-fast`.

If that does not settle it, re-run with debug logging. GitHub says anyone who can run the workflow can enable runner diagnostic logging and step debug logging for a re-run, and the repository variables `ACTIONS_RUNNER_DEBUG` and `ACTIONS_STEP_DEBUG` set to true turn them on for every run. The run then carries a diagnostic log whose worker file records the cancellation request and the step it cancelled; the reports quote lines from a file of that kind, and the maintainers on the runner images repository asked one reporter to re-run with debug logging.

## How do I make a cancelled job clean up?

Put the cleanup in a step with `if: cancelled()` or `if: always()`. The first runs only when the run was cancelled and the second always does, because for a cancelled run the server re-reads each step’s condition. Keep the step short: it has to finish inside the five-minute window. This is for a run that is cancelled. When the runner itself is shut down, the logs quoted in two of the reports say the runner skips evaluating conditions, so a cleanup step is not guaranteed to run, and anything that must happen should not depend on it.

```yaml
steps:
  - uses: actions/checkout@v7
  - run: ./deploy.sh
  - name: Release the environment lock
    if: cancelled()
    run: ./unlock.sh
```

A script that must stop cleanly can also trap SIGINT, since that is the first signal it receives. And if the cause is a cancellation you did not intend, the [post on running less](https://www.runners.io/blog/speed-up-github-actions-by-running-less) shows the concurrency settings that cancel deliberately, so you can tell the ones you wrote from the ones you did not.

## Is a cancelled job billed on runners.io?

A job you cancel from our job page is billed for the time it ran, unless that falls within your free allowance, and a job cancelled before a runner picked it up costs nothing. The [pricing post](https://www.runners.io/blog/github-actions-pricing-2026) sets out how GitHub counts minutes, and the [page on cancelling a job](https://www.runners.io/docs/observability/cancelling-a-job) says what GitHub then shows, cancelled or failed, and why. The [troubleshooting page](https://www.runners.io/docs/help/troubleshooting) lists the other messages a job page can show.

## Sources

- [Workflow cancellation reference](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-cancellation)
- [Cancel a workflow run](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/cancel-a-workflow-run)
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax)
- [Enabling debug logging](https://docs.github.com/en/actions/how-tos/monitor-workflows/enable-debug-logging)
- [The operation was canceled (actions/runner issue 2468)](https://github.com/actions/runner/issues/2468)
- [Error: The operation was canceled (actions/runner-images issue 13263)](https://github.com/actions/runner-images/issues/13263)
- [Jobs ended with 'runner received a shutdown signal' under memory pressure (actions/runner-images issue 15202)](https://github.com/actions/runner-images/issues/15202)
- [Merge CI: superseded run cancels the live one via a shared concurrency group (shakenfist/kerbside issue 636)](https://github.com/shakenfist/kerbside/issues/636)
- [Actions limits](https://docs.github.com/en/actions/reference/limits)
- [GitHub-hosted runners reference](https://docs.github.com/en/actions/reference/runners/github-hosted-runners)

## Frequently asked questions

### What does "The operation was canceled" mean in GitHub Actions?

Something told the job to stop while a step was running: a person, a newer run in the same concurrency group, a failed matrix leg, a timeout or the runner shutting down. The message does not name which, so check each in turn.

### What does "The runner has received a shutdown signal" mean?

The runner is being stopped. For a self-hosted runner the message says its service was stopped or a manually started runner was cancelled. On a hosted runner, a GitHub contributor said a job above its RAM plus swap loses the runner with this message.

### Why was my job cancelled when nobody pressed Cancel?

Often a concurrency group with cancel-in-progress: true shared by several workflows or events, or a matrix with fail-fast on, which defaults to true. The runner's log says UserCancelled in reports where nobody pressed Cancel, so the line does not mean a person did it.

### How much time does a cancelled step get to clean up?

GitHub sends SIGINT to the step's process, then SIGTERM after 7,500 milliseconds, and waits 2,500 more before killing the process tree. After the 5 minute cancellation timeout the server terminates what is left. In a cancelled run, steps with if: always() or cancelled() can run within that window.
