GitHub Actions Workflow Stuck: A Deep Dive into Inconsistent States and Development KPIs
When GitHub Actions Workflows Get Stuck: An Inconsistent State Challenge
A recent GitHub Community discussion highlighted a critical issue where GitHub Actions workflow_dispatch runs became stuck in an inconsistent 'queued' state. This scenario poses significant challenges for teams relying on accurate workflow status for their operations and for robust development kpi tracking. The bug prevented cancellation or deletion, creating 'zombie' runs that complicated workflow management and potentially skewed metrics reported by any software measurement tool.
The Problem: Queued, Jobless, and Uncancellable
JSH-OKD, the author of the discussion, reported two specific workflow_dispatch runs that were stuck in a 'queued' state for several hours. Despite being queued, they displayed a conclusion null and zero jobs, indicating they never truly started processing. Attempts to cancel these runs, both normally and with force cancellation, consistently failed, returning an HTTP 409 error:
HTTP 409: Cannot cancel a workflow run that has not been queued yet.This error message directly contradicted the displayed 'queued' status, pointing to a fundamental inconsistency within GitHub's backend. Further attempts to delete the workflow runs via the API also failed, returning an HTTP 403 error, as runs must be completed or older than two weeks to be deleted. The web interface simply displayed "Failed to cancel workflow."
Exhaustive Isolation Checks Reveal No Obvious Cause
JSH-OKD performed a thorough series of isolation checks to rule out common causes, demonstrating the depth of the problem:
- Previous runs of the same workflow and source commit had succeeded.
- Repository Actions were enabled; the repository was neither archived nor disabled.
- No environment approval was pending.
- There were no other in-progress runs across the account's repositories.
- Actions and storage budgets were not exhausted.
- No workflow code, runner configuration, token permissions, or spending settings were changed.
- GitHub Status reported All Systems Operational.
These checks strongly suggested the issue was not user-configuration related but rather an internal GitHub system anomaly, impacting the reliability of the platform as a software measurement tool for CI/CD processes.
Navigating Recovery: New Runs Succeed, Old Ones Linger
In a subsequent update, JSH-OKD reported an observed recovery for new workflow dispatches. By enabling the workflow temporarily, new workflow_dispatch calls (some explicitly using X-GitHub-Api-Version: 2026-03-10) were able to complete successfully with two jobs each. This demonstrated that the workflow itself was functional and capable of executing builds, even while the original two runs remained stubbornly stuck in their inconsistent state.
Crucially, the successful new runs did not resolve the status of the original, stuck runs. They remained queued, jobless, and un-cancellable, highlighting a persistent data inconsistency that GitHub was urged to investigate.
The Impact on Development KPIs and Software Measurement Tools
This incident underscores the critical importance of accurate and consistent workflow states for effective development kpi tracking. When a software measurement tool monitors CI/CD pipelines, stuck or un-cancellable runs can:
- Skew Lead Time: If a run is perpetually 'queued', it can artificially inflate lead time metrics.
- Impact Deployment Frequency: Inconsistent states might lead to misreporting of successful deployments or block subsequent necessary actions.
- Reduce Trust in Automation: Unreliable workflow status erodes confidence in the automation pipeline and the data it provides.
For organizations striving to optimize developer productivity and measure performance, such inconsistencies can create significant blind spots. The ability to reliably track workflow completion is fundamental for any effective software measurement tool.
A Call for Resolution
The community's experience with these 'zombie' runs highlights a need for GitHub to investigate and provide mechanisms to resolve such inconsistent states. Ensuring that workflow runs can always be brought to a terminal state, even in the event of internal system errors, is vital for maintaining the integrity of CI/CD pipelines and the accuracy of development kpis that drive informed decision-making.
