/
/
Clear stuck GitHub Actions runs without cancelling a deploy
For developers whose runners are tied up by old queued runs, who want them cleared safely by asking their AI assistant.
On this page
Connector
Connect GitHub, pick your AI tool and paste the prompt.
The problem
Stuck runs hold runners and block later builds
GitHub Actions runs get stuck queued or in progress for hours, holding runners and blocking later builds. Clearing them means finding the old ones, checking if a newer run replaced each, and cancelling them one by one.
Without PopdockAI
- Scroll the Actions tab for old queued runs
- Check each for a newer run on the same branch
- Work out which ones are deploys
- Cancel them one by one and hope
With PopdockAI
- Runs queued or running longer than your threshold are listed
- Runs replaced by a newer run are marked
- Deploy and release workflows are pointed out before you choose
- Only runs you approve are cancelled, then re read
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Find the GitHub Actions runs in `{repository}` that have been queued or in progress for more than `{stale-hours}` hours (default 6), and cancel the ones the user approves.
**Step 1: Find the candidates**
Call `github-get-workflow-run` with company `{repository}` and status `queued`, then again with status `in_progress`. Keep only runs whose created-date is more than the threshold ago.
**Step 2: Check each one**
For each candidate, check whether a newer run of the same workflow name on the same branch exists. A superseded stuck run is the safest to cancel; say so.
**Step 3: Confirm**
Show a table: workflow name, run-number, branch, status, hours since created-date, superseded yes or no, url. Ask the user which runs to cancel. Default to none.
**Step 4: Cancel**
For each approved run, call `github-cancel-workflow-run` once, passing its workflow-run-id as run-id. Then re-read with `github-get-workflow-run` and report each run's final status.
**Rules & Guidelines:**
* Never cancel a run the user did not explicitly approve.
* Do NOT call `github-rerun-workflow-run`, `github-disable-workflow` or `github-enable-workflow`.
* Deployment workflows can be long-running on purpose; if a workflow name suggests a deploy or release, point that out before asking.
**Validation:**
* If no runs exceed the threshold, say so and stop.
* If a cancel fails, report it and carry on with the rest.Who it's for
One answer, three teams that use it
DevOps engineers
Free up runners safely
Superseded runs are marked so you can cancel the ones that no longer matter.
Which GitHub Actions runs in fabrikam/api have been queued for over 3 hours?
Developers
Unblock your build
See what is clogging the queue and cancel only the runs you pick.
Find stuck runs in contoso/mobile older than 2 hours and let me choose which to cancel.
Release managers
Avoid cancelling a deploy by mistake
Long running deploy and release workflows are called out before anything is cancelled.
List runs stuck for over 12 hours in northwind/platform and flag any deploys.
How it works
What PopdockAI does when you ask
You name the repository and an age threshold, and your AI assistant lists the stuck runs with context. Nothing is cancelled unless you explicitly approve it.
01
Ask
You name the repository and an age threshold.
02
Find
It lists runs queued or in progress longer than that.
03
Check
It marks runs a newer run replaced and points out deploy or release workflows.
04
Confirm
You approve specific runs, and each is cancelled once and re-read.
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-run
github-cancel-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
Stuck runs cleared, deploys protected
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)
