/
/
Re-run a failed GitHub workflow only when it can help
For developers who want to stop blind re-runs, by asking their AI assistant to check whether a re-run makes sense first.
On this page
Connector
Connect GitHub, pick your AI tool and paste the prompt.
The problem
Blind re runs hide real breaks behind a green tick
Re running a failed GitHub Actions workflow is the reflex fix, but often a newer run already passed or is queued, or the same commit has failed three times. Blind re runs waste minutes and hide real breaks.
Without PopdockAI
- Click re run on the failed workflow
- Miss that a newer run already passed
- Re run a commit that fails every time
- Celebrate a lucky green tick
With PopdockAI
- The workflow is checked active and its latest failed run found
- It declines when a newer run passed or is queued
- Commits failing three or more times get a warning
- One re run after you confirm, never in a loop
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Decide whether the latest failed run of `{workflow-name}` in `{repository}`, on branch `{branch}` when given, should be re-run, and re-run it only after the user confirms.
**Step 1: Check the workflow**
Call `github-get-workflow` with company `{repository}` and name `{workflow-name}`. If its status is not `active`, say it is disabled and stop; a re-run will not help.
**Step 2: Find the run**
Call `github-get-workflow-run` with company `{repository}`, name `{workflow-name}`, branch `{branch}` when given, and max-records 20. Find the most recent run with conclusion `failure`.
* If a newer run on the same branch already succeeded, say so and do not re-run.
* If a newer run is queued or in_progress, say so and do not re-run.
* If the same sha has already failed three or more times, say it is unlikely to be flaky and recommend fixing the code instead. Only continue if the user insists.
**Step 3: Confirm**
Show the run-number, branch, sha, commit-message and url, and ask the user to confirm the re-run.
**Step 4: Re-run**
Call `github-rerun-workflow-run` once, passing the run's workflow-run-id as run-id. Then call `github-get-workflow-run` with run-number set to it and report its new status.
**Rules & Guidelines:**
* Re-run one run at most. Never loop re-runs.
* Do NOT call `github-cancel-workflow-run`, `github-enable-workflow` or `github-disable-workflow`.
**Validation:**
* If no failed run is found, report the latest run's conclusion and stop.
* If `{workflow-name}` matches no workflow, call `github-get-workflow` with name.contains and list the close matches.Who it's for
One answer, three teams that use it
Developers
Re run a flaky job safely
See the run details and re run once, knowing a newer run has not already passed.
Re run the latest failed Unit tests workflow on my feature branch in fabrikam/app.
DevOps engineers
Stop wasting runner minutes
Re runs are declined when they would not help, saving minutes for real work.
Should I re run the failed E2E workflow on main in contoso/web, or is something already queued?
Tech leads
Spot failures that need a code fix
A warning for repeat failures on the same commit tells you a re run will not fix it.
Re run the failed Build workflow in northwind/api unless that commit keeps failing.
How it works
What PopdockAI does when you ask
You name the workflow and optionally a branch, and your AI assistant checks whether a re run can help. It re runs at most once after you confirm and reports the new status.
01
Ask
You name the workflow and optionally a branch.
02
Check
It confirms the workflow is active and finds its latest failed run.
03
Decide
It declines if a newer run passed or is queued, and warns about repeat failures.
04
Confirm
You see the run details and it re-runs once on your yes.
What PopdockAI provides
The tools behind the answer
Ready made tools for GitHub and one secure connection to your AI tool. No code, no exports.
github-get-workflow
github-get-workflow-run
github-rerun-workflow-run
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Re runs only when they can help
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
