GitHub Actions

The Phantom Workflow: When GitHub Actions Skew Your Engineering Metrics

The Phantom Workflow: When GitHub Actions Get Stuck in Limbo

In the fast-paced world of continuous integration and delivery, a smooth, predictable workflow is not just a luxury—it's a necessity. Teams rely on CI/CD platforms like GitHub Actions to automate testing, building, and deployment, providing critical feedback loops and driving efficiency. However, a persistent and perplexing issue highlighted in a recent GitHub Community discussion (Discussion #207496) reveals a significant challenge: GitHub Actions workflow runs getting stuck in a 'queued' state with zero jobs, becoming unmanageable through standard API calls. This isn't just a minor annoyance; it's a bug that can severely impact team productivity, skew critical software engineering quality metrics, and undermine trust in your tooling.

For dev team members, product/project managers, delivery managers, and CTOs alike, understanding and addressing such platform inconsistencies is paramount for maintaining robust delivery pipelines and accurate performance insights.

A Deep Dive into the Inconsistency: The Paradox of States

The core of the problem lies in a severe backend state inconsistency within GitHub's platform. The original report details a workflow run that became 'queued' for weeks, orphaned after its definition file was removed. Despite its public status, attempts to interact with it via GitHub's API yielded contradictory and unhelpful responses. The run's own record, as seen through the API, showed it was queued but had never expanded into jobs:

GET /repos/PyDevices/pygraphics/actions/runs/32219727413
status=queued
c
created_at=2026-08-19T05:31:17Z
updated_at=2026-08-19T05:31:17Z <- never changed
run_attempt=1

GET /repos/PyDevices/pygraphics/actions/runs/32219727413/jobs
jobs: [] <- zero jobs, ever

Further attempts to manage this phantom run revealed a web of conflicting information that defies logical explanation:

  • API Status: GET /runs/32219727413 consistently reported status: queued.
  • Cancellation Attempts: Both POST /runs/32219727413/cancel and POST /runs/32219727413/force-cancel failed with a 409 error, stating the run "has not been queued yet."
  • Rerun Paradox: A POST /runs/32219727413/rerun attempt was rejected with a 403, claiming "This workflow is already running."
  • Deletion Blocked: DELETE /runs/32219727413 returned a 403, indicating "Could not delete the workflow run," implying it needed to be completed—a state it could never reach.
  • CLI Confusion: Even the gh run cancel command reported, "Cannot cancel a workflow run that is completed."

These four cannot all be true simultaneously, which unequivocally points to a backend state inconsistency rather than a misconfiguration on the user's part. It's a classic case of the system disagreeing with itself.

A frustrated developer viewing a screen showing contradictory GitHub API responses for a stuck workflow run.
A frustrated developer viewing a screen showing contradictory GitHub API responses for a stuck workflow run.

How It Starts: The Orphaned Workflow

The specific trigger for this particular incident was the deliberate removal of the workflow definition file (`.github/workflows/docs.yml`) while the run was already queued. This action orphaned the run, leaving it in a state of limbo. Attempts to restore the workflow definition temporarily, and then retry cancellation or deletion, proved fruitless. A fresh dispatch of the restored definition completed successfully, confirming the definition itself was not the issue.

Beyond an Anomaly: A Recurring Challenge

What makes this issue particularly concerning for technical leaders is that it is not an isolated incident. The original poster's search revealed a pattern of similar, unresolved reports:

  • #202511 — stuck Pages re-run, cancel returns 409
  • #204118 — Pages workflow stuck queued; cancel, force-cancel (409) and delete (403) all fail
  • #202969 — permanently stuck queued, cancellation returns HTTP 500
  • #196717 — Actions / Pages workflows stuck queued, cannot be cancelled
  • #135366 — "Cannot cancel a workflow re-run that has not yet queued"
  • #51458 — stuck queued over 24h, cannot cancel

The common thread across these reports is a workflow run whose public status contradicts the scheduler's internal state, zero jobs ever created, and every removal endpoint failing for different, mutually exclusive reasons. This pattern strongly suggests a systemic platform-side issue that GitHub needs to address proactively.

The Impact on Delivery and Metrics

While the immediate impact of a single stuck run might be described as "low," its permanence creates significant headaches for teams striving for operational excellence. Such runs perpetually appear as "active" in CI health sweeps, making it impossible to accurately filter them out without manual intervention. This directly skews performance dashboard metrics and makes it challenging to get a true picture of your CI/CD pipeline's health.

A performance dashboard showing skewed engineering team metrics due to a persistently active, phantom GitHub Actions workflow run.
A performance dashboard showing skewed engineering team metrics due to a persistently active, phantom GitHub Actions workflow run.

For product and delivery managers, these phantom runs introduce noise into reporting, potentially masking real issues or inflating perceived activity. CTOs and engineering leaders relying on accurate engineering team metrics to make strategic decisions find their data compromised. If a system reports an ongoing process that doesn't exist, it erodes confidence in the platform's reliability and the data it provides.

What This Means for Technical Leadership

Reliable tooling is the bedrock of efficient software delivery. When core CI/CD platforms exhibit such fundamental state inconsistencies, it poses a direct threat to productivity and data integrity. Technical leaders need to ensure their teams have the tools to manage their workflows effectively, including clear, user-reachable ways to recover from platform-side errors. Relying on manual intervention from GitHub support, one discussion at a time, is simply not scalable or sustainable for modern engineering organizations.

Seeking Resolution and Reliability

The community's request is clear: confirmation that this is indeed a platform-side inconsistency with no repository-side remedy, and a plan for a user-reachable way to clear runs in this state. This isn't just about fixing a bug; it's about enhancing the robustness and trustworthiness of a critical developer tool.

As GitHub continues to evolve, addressing these underlying platform inconsistencies will be crucial for maintaining its position as a leading CI/CD solution. Providing developers and engineering leaders with the autonomy and tools to manage their workflows, even in edge cases, is essential for fostering productivity and ensuring the integrity of vital software engineering quality metrics.

Share:

|

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

 Install GitHub App to Start
Dashboard with engineering activity trends