Disclosure: independent site. Links to AgentRouter are referral links — we may earn a reward if you sign up, at no extra cost to you. We do not publish pricing or promo numbers we have not verified.

You hit the usage limit

Two separate problems get confused here: burning tokens faster than you need to, and genuinely needing more capacity than your plan allows. The first is free to fix and worth doing first, because it also makes the agent work better. Start there.

Cut consumption first — this is free and it improves output quality

Most agent sessions spend the majority of their tokens on context the model did not need. Fixing that is not a compromise; a focused context usually produces better code than a bloated one.

In rough order of tokens saved per minute of effort:

  1. Start a fresh session per task. Long conversations resend their entire history on every single turn, so a 40-turn session can cost many multiples of a 5-turn one for the same work.
  2. Name the specific files instead of letting the agent search. Exploratory searching reads large amounts of code into context that will be resent on every subsequent turn.
  3. Turn off or narrow automatic full-repo indexing if your tool does it. Scoping to the directory you are working in is usually enough.
  4. Route auxiliary jobs to a small cheap model. Summarizing, titling, and context compression do not need a frontier model — many tools expose a separate setting for these, and it is often left on the expensive default.
  5. Ask for a diff or a single function, not a rewrite of the file. Output tokens are typically billed several times higher than input tokens.
  6. Add ignore rules for build output, lockfiles, vendored dependencies, and generated code so they never enter context.
  7. Stop a session the moment it goes in circles. Two failed attempts on the same error means the context is now working against you — restart with a sharper problem statement.
Where the tokens actually go
  • History resend is the dominant cost in long sessions. It is quadratic in effect: every added turn is paid for by every later turn.
  • A single large file pulled into context early keeps being resent for the rest of the session.
  • Auxiliary model calls are easy to overlook precisely because they are invisible in the chat.
  • Automatic retries on a failing request can multiply spend with nothing to show for it.
  • 'Thinking' or extended reasoning modes consume output tokens quickly. Useful for genuinely hard problems, wasteful as an always-on default.

Then work out which limit you actually hit

The remedies are completely different, so it is worth thirty seconds to identify which one it was.

What you sawWhich limitWhat helps
Blocked for a period, then it works againA rolling window quota on your planReduce consumption as above, or add a second endpoint for overflow work.
429 immediately, clears in secondsA short-term rate limit, not a quotaSlow the request rate or reduce concurrency. Adding capacity elsewhere does not help here.
Hard stop until a reset dateA billing-period capReduce consumption, upgrade, or use a separate endpoint for the rest of the period.
Only large requests failA per-request context limitSend less context per call. This is not a quota problem at all.

If you are not sure which you hit, note whether waiting a few seconds clears it. Seconds means rate limit; hours or a date means quota.

When reducing usage genuinely is not enough

If you have done the steps above and still run out mid-task on most days, you have a real capacity problem rather than a hygiene problem. At that point the options are: upgrade your existing plan, or configure a second OpenAI-compatible endpoint and point the agent at it when the primary is exhausted.

A second endpoint is the more flexible option because most coding agents let you switch base URL and model without changing anything else about your workflow. It also means a quota block stops being a full stop.

The overflow endpoint, with a price you can check before you commit

Once you have cut consumption and still run out of capacity mid-task, a second endpoint is the fix — and it should be one whose cost you can calculate in advance. AgentRouter publishes per-token pricing: claude-opus-5 is listed at $2.000 per 1M prompt tokens and $10.000 per 1M completion tokens on the default group, pay-as-you-go, so no subscription window can lock you out again. It is OpenAI-compatible, which means switching over is a base URL and a model id — keep it configured as a one-line fallback and test it before you are locked out.

Check the pricing yourself →

Referral link — we may earn a reward if you sign up, at no extra cost to you. This is the same advice we would give with no link at all. Check their current pricing and model list on their own site; we deliberately do not restate numbers that change.

Being straight with you about the order: if you are hitting limits because a 60-turn session keeps resending its own history, a second endpoint just means you pay twice for the same waste. The consumption steps at the top of this page are the ones that compound, and they are free. Do those first, then decide whether you still have a capacity problem.

Error not on this page?

The Setup Doctor walks through your tool, symptom, and setup and points at the likely cause — no account needed.

Diagnose my error →