answered from live GitHub & Hugging Face data
How can I manage multiple coding agents like Claude Code and Codex in a single GitHub repository to optimize rate limits?
Verdict: Running several agents on one personal token does not add rate limit. Give each agent its own GitHub App installation, so each one has its own budget.
Many teams assume each agent gets its own rate limit. A personal access token does not work that way. GitHub counts all requests made with that user's tokens against one budget of 5,000 requests per hour. Every agent that uses that token draws from the same pool.
How the budgets differ
| Credential | Hourly primary limit | Shared with | Token lifetime |
|---|---|---|---|
| Personal access token | 5,000 per user | All tools that use that user's tokens, including user-token apps | Set when created |
| GitHub App installation token | 5,000 per installation minimum. Adds 50 per repository above 20, and 50 per org user above 20. Maximum 12,500. | All tokens minted for that installation | 1 hour |
GITHUB_TOKEN in Actions |
1,000 per repository | Workflow runs in that repository | Per job |
The installation row is the key point. The docs describe the limit per installation, not per token. Two agents that share one App installation share one budget. Two App installations give two budgets. This is my reading of the docs, and I did not test it.
Secondary limits apply too
GitHub also enforces secondary limits. These limits hit parallel agents first:
- No more than 100 concurrent requests. This limit is shared across REST and GraphQL.
- No more than 900 points per minute for REST.
POST,PATCH,PUT, andDELETEcost 5 points each. MostGETrequests cost 1. - No more than 80 content-creating requests per minute and 500 per hour. Comments, reviews, and PRs count here.
Steps
- Register one GitHub App for each agent that needs its own identity. Use one App for all agents only if a shared bot identity is acceptable.
- Install each App on the single repository only.
- Mint an installation token for each run. Pass
repositoriesandpermissionsto narrow access. - Read the
x-ratelimit-remainingandx-ratelimit-resetheaders on each response. - If you get a
403or429, wait forretry-after, or untilx-ratelimit-reset. Do not retry before then. Continuing while limited can get the integration banned. - Cap the number of agents that run in parallel. This keeps you under the concurrency and content-creation limits.
Recommendation
Use one GitHub App per agent. Mint short-lived tokens per run, scoped to the one repository. Set your concurrency cap low, and back off on the rate-limit headers. A shared personal token is the wrong choice for several agents, because every agent spends the same 5,000 requests.
- Choose one App per agent if you need separate audit trails and separate budgets.
- Choose one shared App if you only need one bot identity and your workload is light.
I did not check how Claude Code or Codex authenticate to GitHub. If they accept only a personal token, the per-agent setup needs a wrapper that injects the installation token. I did not find an existing open-source tool for this in my search.
If you want this set up without building the token broker yourself, githug gives each agent its own key. That key mints one-hour GitHub App tokens that work on one repository. The hug init --repo owner/repo command sets this up for Claude Code, Codex, and Cursor. It is free during the beta.