Why can't I re-run a GitHub Actions job? Permissions, limits, and disabled workflows
Your workflow run failed, and GitHub won't let you re-run it or any of its jobs. GitHub Actions blocks re-runs when you lack write permissions on the repository, the run is past 30 days, it has hit 50 re-runs, or the workflow is disabled.
Check which of those four blockers hit your run first so you don't waste time guessing. You can also inspect the failed logs or run history before spending another attempt. That keeps you from burning re-runs on a workflow that will keep failing.
Check your repository write permissions and login status
People with write permissions to a repository can re-run workflows in it. Anyone with read access to the repository can list workflow runs through the REST API, yet you still need write permissions to re-run them. If you can see a run but can't trigger it again, check your repository permissions first.
Here's one catch that is easy to miss. You must be logged in to a GitHub account to view workflow run information, including for public repositories. If a link shows nothing or blocks you while signed out, sign in first and then check your access.
Re-runs also follow a specific privilege rule when someone else retries a run for you. Re-runs use the privileges of the actor who initially triggered the workflow, not the privileges of the actor who initiated the re-run. So if one person triggers the workflow and another initiates the re-run, it still runs under the initial actor's privileges.
To re-run failed jobs from GitHub CLI, run:
gh run rerun RUN_ID --failedIf you use the REST API to re-run a job and its dependent jobs in a workflow run, use this endpoint:
https://api.github.com/repos/OWNER/REPO/actions/jobs/JOB_ID/rerunCheck the 30-day window and the 50 re-run limit
GitHub Actions enforces two hard cutoffs on every workflow run, and either one stops re-runs:
- Age cutoff: You can re-run a workflow run, all failed jobs in a workflow run, or specific jobs in a workflow run up to 30 days after its initial run. Once a run passes 30 days, trigger a new workflow run instead.
- Attempt cap: A workflow run can be re-run a maximum of 50 times. This limit includes both full re-runs and re-runs of a subset of jobs.
You can burn through 50 re-runs fast if you keep retrying a noisy run. In short, once you hit 50 re-runs, retrying that same run will not work. A workflow run is an instance of your workflow that runs when the pre-configured event occurs, so trigger a new run instead.
There are limits in GitHub Actions which you may hit as you scale up, and some may be increased by contacting support. Unless otherwise stated, reaching a limit cancels the workflow or job. Check these runner and check-suite limits if a job stopped unexpectedly:
- GitHub-hosted runners: Each job in a workflow can run for up to 6 hours of execution time before it is terminated and fails.
- Self-hosted runners: Each job can run for up to 5 days of execution time before it is terminated and fails.
- Self-hosted queue limit: A job can stay in the queue for 24 hours before it is automatically cancelled.
- Check suites: A check suite can have a maximum of 50,000 check runs, and after that limit additional check runs cannot be created for that check suite.
Enable disabled workflows and fix broken workflow files
You can't re-run a workflow run, or any of its jobs, while the workflow is disabled. You need to enable the workflow first. Once it's enabled, you can retry eligible runs that are still within 30 days and under 50 re-runs.
Also check your workflow file before retrying. An invalid workflow file generates a failed workflow run for every new commit. Ensure that you only commit valid workflow files to your repository so new commits don't keep failing right away.
Understand dependent jobs and partial re-run logs
Even when re-running works, a partial re-run changes which jobs run and what ends up in downloaded logs:
- Dependent jobs run again too: When you re-run failed jobs or a specific job, GitHub also re-runs the jobs that depend on them. Jobs that aren't included keep their outputs from the previous attempt, which the newly run jobs can use.
- Log archives shrink on partial re-runs: When you download the log archive for a workflow that was partially re-run, the archive only includes the jobs that were re-run. To get a complete set of logs for jobs that were run from a workflow, you must download the log archives for the previous run attempts that ran the other jobs.
If you want to target one specific job from GitHub CLI, run:
gh run rerun --job JOB_IDCheck the failed step logs before spending another re-run. In workflow run logs, any failed steps are automatically expanded to display the results. The catch is that when you search logs, only expanded steps are included in the results.
You can also filter GitHub CLI logs to failed steps with:
gh run view --job JOB_ID --log-failedCheck whether the failing check is flaky before re-running
Re-running blindly eats through your 50-re-run limit without telling you whether the check has been passing and failing on earlier runs. Anyone with read access to the repository can list workflow runs through the REST API to check that history:
https://api.github.com/repos/OWNER/REPO/actions/runsYou can filter those results by branch or by a created date-time range, with up to 100 results per page. Keep API rate limits in mind if you script this check. Unauthenticated requests have a primary rate limit of 60 requests per hour, while requests with a personal access token count toward your personal rate limit of 5,000 requests per hour.
If you want that check directly on a GitHub pull request without querying the API yourself, FlakeRadar is one option. It is a Chrome extension that reads the repository's own GitHub Actions history from api.github.com and labels each failing GitHub Actions job as Known flake, New failure, Also failing on the default branch, or Not enough history, while listing checks from other CI systems as not analysed. A job counts as flaky when it failed and then passed on the same commit, shown with counts, a time window, and a date such as failed then passed on the same commit on 4 of 120 commits on main in the last 30 days. Your settings and GitHub token stay on your device, and the token goes only to api.github.com. The Free plan ($0) includes labels for failing checks on public repositories, 30 days of history, and one-click re-run if you turn it on with an Actions read-and-write token; the Pro plan ($19/month) includes everything in Free plus private repositories, 90 days of history, pinned repositories, a refresh button, and alerts.
Sources
- GitHub Docs guide to re-running workflows and jobs
- GitHub REST API reference for workflow runs
- GitHub Actions usage limits and rate limits reference
- GitHub Docs guide to using workflow run logs
Questions
How long after a run can you re-run a failed GitHub Actions job?
You can re-run a workflow run, all failed jobs in a workflow run, or specific jobs in a workflow run up to 30 days after its initial run. After 30 days, you need to trigger a new workflow run instead.
How many times can you re-run a GitHub Actions workflow run?
A workflow run can be re-run a maximum of 50 times, including both full re-runs and re-runs of a subset of jobs.
Why did re-running one failed job also start other jobs?
When you re-run failed jobs or a specific job, GitHub also re-runs the jobs that depend on them. Jobs that aren't included keep their outputs from the previous attempt, which the newly run jobs can use.
Does a Known flake label in FlakeRadar mean the failure is safe to ignore?
No. It means the same job has failed and then passed on one commit before. That is evidence, not a promise. If the failure matters, read the log.