Resolving Stuck GitHub Actions: A Deep Dive into Software Monitoring Challenges

When GitHub Actions runs get stuck in a "queued" state with zero jobs, refusing to cancel or rerun, it creates a significant roadblock for development teams. This common issue challenges effective software monitoring of CI/CD pipelines and often stems from platform incidents. This insight explores why these "orphaned records" occur and outlines supported recovery paths.

A developer troubleshooting a stuck CI/CD pipeline on a monitor.
A developer troubleshooting a stuck CI/CD pipeline on a monitor.

The Dilemma: Stuck GitHub Actions and Conflicting Errors

The core problem involves GitHub Actions runs that appear "queued" but report zero jobs, a null conclusion, and an unchanging timestamp. Attempts to manage these runs via the API or GitHub UI lead to frustratingly contradictory errors:

  • 409 Cannot cancel a workflow run that has not been queued yet: This error indicates that while a run record exists, no actual jobs were ever initialized. There's nothing for the cancellation to act upon.
  • 403 This workflow is already running: Paradoxically, rerunning the workflow states it's already running. The system perceives the orphaned run as active, preventing new attempts.

This state presents a false positive for software monitoring, showing an active run without actionable status or controls. The GitHub UI typically lacks a direct "delete" or "clear" option for runs in this specific limbo, leaving developers stuck.

Magnifying glass over a broken workflow in a software development process.
Magnifying glass over a broken workflow in a software development process.

Understanding Orphaned Runs: Incident Aftermath

These "orphaned records" are frequently a lingering effect of broader GitHub Actions incidents. A platform issue can cause workflow runs to be initiated but fail to provision underlying jobs due to backend problems. Once the incident resolves, new runs might execute normally, but these specific, partially created records remain. They consume no minutes but can block subsequent actions if concurrency groups are involved.

Immediate Workarounds to Unblock Your PR

While direct manipulation of stuck runs is often impossible, you can trigger fresh, functional runs to unblock your Pull Request (PR):

Triggering a New Workflow Execution

  • Push a new commit: An empty commit (git commit --allow-empty -m "Trigger CI" && git push) to your PR branch will trigger new pull_request workflows.
  • Close and reopen the PR: Default pull_request triggers often include reopened events, initiating new runs for the current head.
  • Manual dispatch: If your workflow defines workflow_dispatch:, you can manually start a run. Note: manual runs might not satisfy required checks tied to the pull_request event.

If your workflows use a concurrency group, check if the stuck runs are blocking new ones. If so, clearing them becomes critical.

Attempting API Deletion (Use with Caution)

You can try deleting the run record via the GitHub API, though it might be refused for "in progress" runs:

gh api -X DELETE repos/Dytschgo/imnota/actions/runs/43097671914

Repeat for all affected run IDs. This only removes the run record and doesn't affect your PR, code, or check history. It does not start a new run.

The Essential Step: Escalating to GitHub Support

Community members cannot inspect or clear these orphaned records. If workarounds don't fully resolve the issue, the definitive solution is to escalate to GitHub Support. Re-open your existing ticket or create a new one at https://support.github.com/contact.

Provide comprehensive details:

  • Your repository and PR number.
  • All affected run IDs and the check suite ID.
  • Head SHAs.
  • Exact 409 and 403 error responses.
  • Timestamps when runs became stuck.
  • Links to the GitHub troubleshooting section and relevant community discussions.

Clearly state you need GitHub staff to reconcile or clear records, explicitly requesting no required checks be bypassed. This preserves the integrity of your software monitoring and deployment process.

Best Practices: Maintain Check Integrity

Avoid bypassing required checks using API statuses or altering branch protections. The goal is to restore proper CI/CD function, not circumvent it. Prioritize fresh validation runs, then security checks, before merging. This ensures robust pipelines and accurate engineer statistics on build health.

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends