Skip to content

How do I cancel or re-run a job?

On a job’s page in the dashboard, Cancel run, Re-run job and Re-run failed jobs; in the TUI’s job view, x, a and A; from a shell, runnerctl cancel and runnerctl rerun. Each shows what GitHub would do and sends nothing until you confirm it.

GitHub cancels runs, not jobs, and a re-run takes the jobs that depend on the one re-run with it. So runnerctl cancel and runnerctl rerun first read the run from GitHub, print what GitHub would do to its current attempt and the other jobs of the run runnerd knows (GitHub may have more, on other runners), and send nothing. They end with a command such as runnerctl cancel 9001 --confirm 3f9a…, which sends what they showed, once, within 5 minutes. If the run has moved to another attempt by then, or runnerd’s config changed, nothing is sent: you get a new preview. If GitHub would not show the run, there is nothing to confirm until it does. --force skips the preview and sends at once, for scripts. The answer is one of four: GitHub took it, the run had already finished, GitHub refused (with its HTTP status and what to check), or the outcome is unknown, as after a timeout; then check the run on GitHub before asking again. runnerd’s own record of the job stays as it was; the cancelled job and the new attempt arrive as GitHub lists them. [github] job_actions = false turns both off.

The cancel preview on a job's page: the run it cancels at its current attempt, what GitHub stops, that runnerd knows no other job of the run, and the buttons Cancel run and Keep it.The cancel preview on a job's page: the run it cancels at its current attempt, what GitHub stops, that runnerd knows no other job of the run, and the buttons Cancel run and Keep it.

With rerun_runner_faults = true on a repository, runnerd re-runs a run its runner failed without asking. It is off by default because a runner fault is read from what the failed step printed, and a job’s own code can print the same words, as a test of mount errors would. The optional Sysbox probe records evidence that log output alone cannot fake. Compare it with real faults before reconsidering the rerun default.

When a job ends as a runner fault, the run completed as a failure and every other job of its attempt that failed or was cancelled is a runner fault too, runnerd asks GitHub to re-run the run’s failed jobs, without a preview. It decides that only for a run’s first and second attempts, reading the run again right before it asks. A job that failed in its code, on another machine, or a run cancelled as a whole leaves the run alone.

These checks bind runnerd’s decision, not the request. GitHub’s re-run names no attempt: if a person re-runs the run in the moment between runnerd’s last read and GitHub handling its request, runnerd’s request re-runs the person’s attempt too, whatever its jobs did. runnerd sends each attempt’s request once, and records that before it goes out, so a restart never sends it again; when GitHub does not say whether it took the request, as after a timeout, runnerd does not ask again. Only a re-run GitHub accepted shows on the job’s page as runnerd re-ran the run’s failed jobs as attempt 2. If GitHub refuses, as for a token without Actions: write, runnerd holds that repository’s re-runs for an hour and says so in the attention list. job_actions = false turns it off too.

A classic token needs the repo scope, a fine-grained one Actions: write; runnerd doctor says what it can tell without trying. Security model says what these actions can do on GitHub.