GitHub Secondary Rate Limit Hitting Your AI Agent

Updated 2026-12-03

The error is "You have exceeded a secondary rate limit. Please wait a few minutes before you try again." (sometimes: "...and have been temporarily blocked from content creation. Please retry your request again later.") — a 403, separate from your normal hourly API quota. It's a pacing limit, not a volume limit: an agent that pushes, opens pull requests, posts comments, or creates issues too fast or in too many parallel requests trips it even with hours of quota left on the primary limit.

Primary limit vs. secondary limit

Primary rate limitSecondary rate limit
What it capsTotal requests per hourRequest rate and concurrency, regardless of remaining quota
Where it showsX-RateLimit-Remaining / X-RateLimit-Reset headersNo advance header — you find out when the 403 arrives
Typical triggerPolling an endpoint too many times in an hourMany content-creation calls (push, PR, issue, comment) back to back or in parallel
Wait timeKnown exactly, from the reset header"A few minutes," GitHub says, but can run up to an hour

See GitHub API rate limit exceeded for the primary-limit numbers — this page is about the other one.

Why this hits agent workflows specifically

A single human pushing commits every few minutes rarely comes close. An agent (or a fleet of agent sessions) that pushes a commit per small change, opens a PR per task, or posts a progress comment per step can easily fire a dozen content-creation calls in a few seconds — especially if several agent sessions run in parallel against the same token or the same repo. GitHub's own guidance is to keep concurrent requests low, avoid firing requests in a tight loop, and back off with real delay rather than retrying immediately.

How to pace around it

  1. Serialize writes per agent session — don't fire a push, a PR, and a comment all in parallel for the same task; do them one at a time.
  2. Cap concurrency across a fleet. Several agent sessions sharing one token or one repo should queue, not race, their content-creation calls.
  3. Add a real delay between write calls (at least a second), not a tight retry loop — retrying immediately after a 403 extends the block, it doesn't clear it.
  4. Batch where the API allows it: one commit with several file changes instead of one push per file; one PR body instead of a PR plus several follow-up comments.
  5. If you're scripting this yourself, read GitHub's own secondary-limit guidance at docs.github.com/rest/using-the-rest-api/best-practices-for-using-the-rest-api before building a bigger retry system — the fix is usually pacing, not a smarter backoff algorithm.

Hosted: no hidden concurrency ceiling for normal agent use

Rithub doesn't treat ordinary push and commit volume as abuse. Agent-scoped tokens push through the same git protocol and the native MCP endpoint without a separate, undocumented pacing limit on top of the published one: Free allows up to 500 pushes/day/repo and 2,000 commits/day/account; paid plans have no push or commit limit. An agent working through a normal task loop — commit, push, open a PR — doesn't need its own rate-limit backoff logic just to stay under a ceiling nobody published in advance.

Sign up freeImport from GitHub