## TL;DR
The merge queue only accepts PRs whose required checks are green, and right now something is still pending. Usually you just wait for CI to finish. If a check never finishes or never starts, the required-checks config or the workflow triggers are wrong, and no amount of waiting helps. Find the stuck check, fix why it never reports, then queue again.

## The error
```text
merge queue failed: this pull request cannot be added: checks are still pending: how to fix
```

## Steps

### 1. List the pending checks
Open the PR's Checks tab and note which checks are queued or in progress versus which are done.
Expected output: a concrete list of what the queue is waiting on.

### 2. Wait for genuinely running checks
If CI is actually running, wait for it. The queue re-evaluates automatically when checks complete.
Expected output: checks turn green and the queue accepts the PR.

### 3. Find checks that never report
If a required check shows as "Expected" but never starts, open the workflow file and check its `on:` triggers. A workflow that only runs on `push` never reports on a PR.
Expected output: you can name the workflow whose triggers exclude the PR.

### 4. Fix the trigger or the requirement
Either add the `pull_request` trigger to the workflow, or remove the check from the required list in branch protection if it should not gate merges.
Expected output: the check either runs on the PR or is no longer required.

### 5. Re-run stuck checks
For checks stuck in queued state, re-run them from the Checks tab or push an empty commit to retrigger.
Expected output: the check starts and eventually reports a result.

### 6. Add the PR to the queue again
Once every required check is green, use the queue button or the merge queue command again.
Expected output: the PR enters the queue.

## When to use
- The exact "checks are still pending" message on queue add
- A required check shows "Expected" forever
- CI was recently reconfigured and the queue started rejecting PRs

## When not to use
- Merge conflicts blocking the queue
- The branch being out of date (different error)
- Dismissed reviews or missing approvals

## Tool compatibility
- GitHub merge queue (branch protection with queue enabled)
- GitHub Actions, and any CI that reports check runs
- gh CLI for retriggering runs

## Variant phrasings
### cannot add PR to merge queue checks pending
Same fix. Identify the pending check and find out why it never completes.

### merge queue waiting on expected check that never runs
The check is required but its workflow never triggers on the PR. Steps 3 and 4 cover it.

### PR stuck before merge queue
If it is stuck at the queue-add step rather than inside the queue, the pending-checks gate is the cause.

## Why it happens
The merge queue builds a merge commit from the PR plus everything ahead of it, and it refuses to start that work until the PR's required checks pass. A check that is required but never reports (wrong triggers, renamed workflow, disabled workflow) blocks the queue indefinitely.

## Edge cases
- Renamed workflows: branch protection still requires the old check name. Update the required list after renames.
- Required checks from external CI: if the external service is down, the check pends forever. Have a fallback plan.
- Draft PRs: some workflows skip drafts, leaving required checks pending. Mark ready for review first.
- Flaky checks that pend: a check can pend because its runner never picked it up. Re-run rather than waiting.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_9yFafKr5ftaxe_4TSkIXGQ
