# Self-Healing CI: Auto-Retrying "API rate limit exceeded"

> "API rate limit exceeded" in a workflow step is a budget that refills on a clock, not a permissions error. See the manual fix and how self-healing CI waits out the window.

Source: https://latchkey.dev/learn/self-healing-ci/self-healing-github-api-rate-limit-exceeded  
Updated: 2026-09-02

A step failing with "API rate limit exceeded" consumed its request budget: the token is valid, the budget refills on a fixed clock, and the same call succeeds after it does.

## What makes a failure safely retryable

Automatic retry is only correct for failures that are genuinely transient. Retrying a deterministic failure wastes minutes and hides a real defect, so the classification matters more than the retry mechanism.

- Safe to retry: network timeouts, registry 5xx, transient DNS failures, a service container that was not ready, a spot instance reclaimed mid-run.
- Not safe to retry: assertion failures, compile errors, lint violations, anything that fails identically on every attempt.
- Ambiguous, and worth investigating rather than retrying: out-of-memory kills, disk exhaustion, and flaky tests. These repeat under load and a retry only hides the trend.
- Always record that a retry happened. A pipeline that silently retries is a pipeline whose real failure rate you do not know.

## FAQ

### Why did this happen when my token has plenty of budget?

Check whether the failing call actually sent the token. Unauthenticated requests fall back to a small per-address budget shared with every other job on that runner address, which is exhausted easily.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
