Stuck GitHub Actions Run? Troubleshooting Orphaned Workflows with this Git Development Tool

GitHub Actions is a cornerstone of modern CI/CD, enabling powerful automation directly within your repositories. However, like any complex system, occasional glitches can occur. A recent discussion on the GitHub Community forum highlighted a particularly frustrating scenario: a workflow run permanently stuck in a 'queued' state, impervious to cancellation or deletion attempts. This insight from devactivity.com explores the problem and provides actionable solutions for users encountering similar issues with this essential git development tool.

Developer troubleshooting a stuck GitHub Actions workflow run amidst successful ones.
Developer troubleshooting a stuck GitHub Actions workflow run amidst successful ones.

The Case of the Orphaned Workflow Run

The discussion, initiated by Tommaso20BW, detailed a specific GitHub Actions workflow run in their public repository, Tommaso20BW/Notizie_JR, that had been stuck in the queued state for an extended period. Despite numerous attempts to cancel it via the GitHub web interface, REST API (both standard and force-cancel endpoints), and even the delete endpoint, all efforts failed, returning HTTP 500 (server error) for cancellations and HTTP 403 (forbidden) for deletions.

Crucially, Tommaso20BW noted that newer runs of the same workflow were completing successfully. This observation was key, as it immediately ruled out common causes like misconfigured concurrency groups or general runner issues. The problem was isolated to a single, specific workflow run ID (30157630153), suggesting a deeper, more localized issue.

Using the GitHub CLI to delete an orphaned workflow run.
Using the GitHub CLI to delete an orphaned workflow run.

Understanding the Backend Glitch

Community member jrb00013 provided valuable context, identifying this as a "known-ish class of Actions bug." This occurs when a workflow run enters a corrupted or inconsistent state on GitHub's backend. The HTTP 500 error on cancellation isn't a user error; it's the server "choking on a bad run state," unable to process the request due to the internal corruption. Such runs become "orphaned" records, visible in the UI but unresponsive to standard management commands.

Your First Line of Defense: The GitHub CLI

When faced with an unresponsive workflow run, your git development tool arsenal includes the powerful GitHub CLI (gh). The CLI often provides more direct access and can sometimes bypass UI limitations. For orphaned runs, the primary command to attempt is gh run delete.

Exact Cleanup Command (Try This First)

From your machine, authenticated as the repository owner, execute one of the following commands:

gh run delete 30157630153 -R Tommaso20BW/Notizie_JR

Or, if you prefer using the raw API via the CLI:

gh api -X DELETE repos/Tommaso20BW/Notizie_JR/actions/runs/30157630153

This command attempts to directly remove the zombie run from your Actions list. If it succeeds, your problem is solved.

When to Engage GitHub Support

If the gh run delete command also fails, returning a 403 or 500 error, it confirms that the record is indeed corrupted on GitHub's side. At this point, the issue is beyond user-level intervention, and you'll need GitHub Support to purge it server-side. When filing a support ticket, be sure to include:

  • The full repository name (e.g., Tommaso20BW/Notizie_JR).
  • The specific workflow run ID (e.g., 30157630153).
  • Confirmation that both cancel and force-cancel attempts resulted in HTTP 500 errors.
  • Confirmation that delete attempts resulted in HTTP 403 errors.
  • Crucially, mention that later runs of the same workflow are completing successfully, indicating no general blockage.
  • Request them to "purge/cancel server-side."

Key Takeaways for Developer Productivity

While an orphaned run can be annoying, it's important to remember a few points for maintaining developer productivity:

  • Don't keep hammering cancel: Repeated attempts won't fix a corrupted backend record and can be a waste of time.
  • It's likely not blocking: If newer runs of the same workflow are completing, the zombie run isn't impeding your pipeline. However, for clean engineering stats and a tidy performance monitoring dashboard, removing it is ideal.
  • Leverage the CLI: The GitHub CLI is an invaluable git development tool for troubleshooting and managing your GitHub resources more effectively.

Understanding these nuances helps streamline your workflow management and ensures that minor glitches don't derail your development efforts. The community discussion underscores the value of shared knowledge in navigating the complexities of modern development platforms.

|

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

 Install GitHub App to Start
Dashboard with engineering activity trends