Skip to content

Agents and multimodal systemsGuide

Parallel subagents hit rate limits: budgeting concurrency

An agent that fans one request into dozens of model calls spends a provider's per-minute budget in seconds. This guide converts tokens-per-minute limits into slots, divides them across runs and tenants, and sets rules for what waits, degrades or is dropped.

By INFRO Editorial

Published

10 min read

A glowing autonomous agent core coordinating tools, memory, and multiple AI model routes

In short

Convert the binding tokens-per-minute limit into a call rate, multiply by call latency to get a slot count, and divide the slots across tenants and runs with caps acquired narrowest-first. Queue what can wait, degrade what can shrink, shed what is optional.

Key takeaways

  • Provider limits are per-minute token buckets, but what you control is how many calls are in flight, so convert one into the other with call rate times latency.
  • The binding limit is whichever of RPM, input or output tokens per minute runs out first for your call shape, and it differs per model and tier.
  • Acquire the run cap, then the tenant cap, then the shared slot, so a run waiting on its own limit never holds shared capacity.
  • Decide per work class whether excess calls queue, degrade or shed, and give queued calls a deadline.
  • On a 429, pause the shared bucket once instead of letting every worker retry on its own, and do not retry a spend-limit 429.

Why fan-out breaks per-minute limits

A subagent design turns one user request into a burst: a planner emits 30 research or review tasks and a worker pool fires them together. Provider limits are written in per-minute terms, but they are enforced over shorter intervals. Anthropic notes that a limit of 60 requests per minute might be enforced as one request per second, so short bursts can trigger rate limit errors even when the minute total is fine.1 It also says a sharp increase in usage can cause 429s on its own.1 A fan-out is exactly that shape.

The limit is also shared. Anthropic enforces limits at the organization level, with optional workspace limits you set yourself.1 On Azure, quota is scoped to the subscription, and Global Standard deployments of the same model and version share one pool across all regions in that subscription.2 So one tenant's run, a nightly batch and another team's agent all draw on the same bucket. Without a budget, whoever fires first wins and everyone else gets 429s.

This post covers the part that bounding agent loops and deciding which requests survive a quota shortfall do not: how many calls may be in flight, per run and per tenant, and what happens to the calls that do not fit.

Turn a tokens-per-minute limit into a slot count

You cannot schedule against "tokens per minute" directly, because you control how many calls are in flight, not how many tokens a minute contains. Convert in three steps.

  1. Find the binding limit: for your call shape, which of requests, input tokens or output tokens per minute runs out first.
  2. Divide it by tokens per call to get a sustainable calls per minute.
  3. Multiply by call latency in minutes. In-flight calls equal arrival rate times time in system, so that product is the number of slots.

Which limit binds depends on the provider. Anthropic limits requests, input tokens and output tokens per minute per model class, and only uncached input counts toward input tokens per minute: cache reads do not count, cache writes do.1 Output tokens are counted as they are produced, and max_tokens does not factor in.1 Azure publishes a requests-per-minute and tokens-per-minute pair per model, deployment type and quota tier. For some gpt-chat-latest versions the ratio is 1 RPM per 1,000 TPM, against 10 RPM per 1,000 TPM for others, so requests per minute can bind first on short calls.2 At Tier 1, for example, Global Standard gpt-6.2-sol lists 250 RPM and 250,000 TPM.2 Tiers and numbers change, so read your own limits page rather than a table copied into a runbook.

Treat the headroom as a parameter. Estimates are wrong in both directions: Anthropic estimates input tokens at the start of a request and adjusts as the request proceeds,1 and your own pre-call estimate will be looser than that. Reserve more headroom if other services share the key or the pool.

Split the slots: provider, tenant, run

One number is not a policy. Use three nested ceilings and choose each from a different question.

CeilingQuestion it answersSizing rule
Provider budgetHow much can the shared account sustain?Binding limit minus headroom, per model
Tenant capHow much of that may one customer or team hold?A share of the slots, with a small guaranteed floor
Run capHow wide may one fan-out go?Small relative to the tenant cap, so one tenant can run several jobs
The three ceilings and the question each answers.

Continuing the illustrative example with 26 slots: a tenant cap of 10, a run cap of 6, and a floor of 2 slots reserved for interactive work. Five busy tenants would oversubscribe the caps (50 against 26), which is intended. Caps are ceilings, not allocations; the shared pool is first-come within them. If you want guarantees rather than ceilings, make the floor a real reservation.

Keep two budgets per model, not one, if you run mixed traffic. A chat answer a person is waiting on should not queue behind a 200-call background audit. The simplest form is a reserved interactive floor plus a shared remainder; the audit can only ever use the remainder.

Acquire narrow to wide

The order of acquisition matters more than the numbers. If a call grabs a shared slot first and then waits on its tenant's cap, a saturated tenant parks calls on shared capacity and blocks everyone. Acquire the run limit, then the tenant limit, then the shared slot, and the token reservation last. A call waiting on its own run cap holds nothing that anyone else needs.

admission.py
import asyncio, time

class TokenBucket:
    """Reserve estimated tokens; refund the difference after the response."""
    def __init__(self, per_minute: int):
        self.cap = float(per_minute)
        self.level = float(per_minute)
        self.rate = per_minute / 60.0
        self.t = time.monotonic()
        self.paused_until = 0.0

    def _refill(self):
        now = time.monotonic()
        self.level = min(self.cap, self.level + (now - self.t) * self.rate)
        self.t = now

    async def take(self, n: float):
        while True:
            self._refill()
            now = time.monotonic()
            if now >= self.paused_until and self.level >= n:
                self.level -= n
                return
            await asyncio.sleep(0.05)

    def refund(self, n: float):
        self.level = min(self.cap, self.level + n)

    def pause(self, seconds: float):
        # One shared pause on 429, not one retry loop per worker.
        self.paused_until = max(self.paused_until, time.monotonic() + seconds)

class Admission:
    def __init__(self, slots: int, otpm: int, tenant_cap: int, run_cap: int):
        self.shared = asyncio.Semaphore(slots)
        self.bucket = TokenBucket(otpm)
        self.tenant_cap, self.run_cap = tenant_cap, run_cap
        self.tenants: dict[str, asyncio.Semaphore] = {}
        self.runs: dict[str, asyncio.Semaphore] = {}

    async def call(self, tenant, run, est_out, send, deadline_s):
        t = self.tenants.setdefault(tenant, asyncio.Semaphore(self.tenant_cap))
        r = self.runs.setdefault(run, asyncio.Semaphore(self.run_cap))
        async def go():
            async with r, t, self.shared:       # narrow to wide
                await self.bucket.take(est_out)
                resp = await send()
                self.bucket.refund(max(0, est_out - resp.output_tokens))
                return resp
        # Queue with a deadline; the caller decides what a timeout means.
        return await asyncio.wait_for(go(), timeout=deadline_s)

Two properties to check. asyncio.Semaphore wakes waiters in order, so within a tier waiting is first-in-first-out; the run and tenant semaphores keep one tenant's backlog from filling the shared queue. And the bucket is sized on the binding limit from the worked example (output tokens), with the input side handled by the slot count; if input binds for your shape, put the bucket on input instead. For the weighted fairness described below, replace the plain semaphore with a deficit round-robin queue.

Queue, degrade or shed

Admission control needs an answer for the call that does not fit. The three answers cost different things, so choose per work class and write the choice down.

Work classOn excessWhy
Interactive, user waitingQueue briefly, then degradeA long wait is worse than a thinner answer
Background, deadline in hoursQueue with a long deadlineLatency does not matter; completion does
Optional enrichmentShedDropping it leaves a correct answer
Required step of a runQueue, then fail the run cleanlyA half-finished run wastes the tokens already spent
Excess-call policy by work class.

Degrade means narrowing the fan-out rather than failing it: run 8 subagents instead of 30, or send the long tail to a smaller model, or merge subtasks into one call. Decide the minimum viable width per run type in advance and let the planner read the width it was granted. Shed should be visible: return which subtasks were skipped, so the answer says "9 of 12 sources checked" rather than silently shrinking. Give every queued call a deadline, as deadline_s does above; a queue without deadlines turns a rate limit into unbounded latency.

Never convert a refused call into an immediate retry loop. When the provider does send a 429, honor the wait it names: Anthropic says to wait the retry-after seconds when the header is present.1 Apply that wait once to the shared bucket (pause above) so 26 workers do not each sleep and then fire together. After a 429, shrink the slot count and grow it back slowly, additive increase and multiplicative decrease, so the budget tracks what the provider actually admits.

One 429 should not be retried at all. Anthropic returns rate_limit_error with error_code enforced_spend_limit_reached when an organization hits its monthly spend cap, with no retry-after, and retries, including the SDK's automatic ones, fail until access resumes.1 Branch on the code, stop the run, and surface it. A limit you set yourself is reported differently, as a 400 rather than a 429.1

Keep one run from starving the others

Three failure modes show up once the caps exist.

  • Slot hoarding by parents. A subagent that spawns children and then holds its own slot while waiting for them can fill every slot with waiting parents and deadlock the tree. Release a slot before waiting on children; only a call that is actually on the wire should hold one.
  • Partial admission. If a run gets 3 of the 8 slots it asked for and holds them while it waits for the rest, two such runs can each hold half the pool and neither finishes. Grant a run its first wave all at once or at a reduced, fixed width.
  • Retry amplification. A run whose calls keep failing consumes slots and tokens for nothing. Give each run a retry allowance and a token ceiling, then fail it. Bounding step, time and spend covers those limits.

For fairness across tenants, weight by plan or contract, not by arrival order. Deficit round-robin over per-tenant queues gives each tenant its share when all are busy and lets an idle tenant's share be used by others. The reserved interactive floor is what keeps a background tenant's backlog from delaying a person who is waiting.

What a gateway adds, and what it does not

Provider limits are the ceiling you design to. A gateway can enforce part of the same shape one hop earlier. INFRO's key limits are requests per minute per key, chosen from fixed tiers, and they belong to the key rather than the plan.3 A key can also carry a concurrency limit, the most requests in flight at once with streams included; one more is refused until one finishes. Giving each tenant or each agent service its own gateway key makes that a backstop behind your own scheduler. Two limits to plan around. These are request counts and in-flight counts, not tokens, so the token budget stays in your admission code. And X-RateLimit-Remaining is a best-effort upper bound, so the docs say to back off as it approaches zero but not to schedule against it.3

The gateway does not add capacity. INFRO's documentation says your own provider accounts keep their model, token and request quotas, and that it adds no shared pool of purchased capacity.3 Failover to another eligible connection you configured can move traffic to a second quota, which is useful but is a different mechanism from budgeting, and it does not treat throttling as an outage; see circuit breakers for LLM providers. A 429 from your own provider reaches you with the code provider_rate_limited, distinct from the gateway's own limit error, which lets your scheduler tell the two apart.4

To see which run is hogging a budget, send a shared trace_id and workflow on each call. GET /v1/runs then lists one row per run with requests, errors, duration, models and estimated provider cost, and sort=costliest surfaces the runs that burn the most.5 Request count per run is a direct check on whether your fan-out cap is being honored.

Checklist before you ship the budget

  • The binding limit (requests, input or output tokens) is identified per model from your own limits page, not assumed.
  • Slots are computed from measured tokens per call and p50 and p95 latency, with a stated headroom.
  • Run, tenant and shared limits are acquired narrow to wide.
  • Interactive and background work have separate floors or separate budgets.
  • Every queued call has a deadline and every timeout has a defined outcome (degrade, shed or fail).
  • A 429 pauses the shared bucket once and shrinks the slot count; a spend-limit 429 stops the run.
  • Parents release slots before waiting on children.
  • Each run has a retry allowance and a token ceiling.
  • Queue wait, shed counts and per-run request counts are on a dashboard next to the 429 rate.

Questions readers ask

Does a streaming call hold its slot until the stream ends?
Yes. Count the slot as in use from the moment the request is sent until the last token arrives or the stream is cancelled. Streams are long-lived, so they raise the latency term in the slot formula more than short non-streaming calls do.
How often should the budget be recomputed?
Whenever the model, the tier or the typical call shape changes, and after any window in which measured tokens per call drifted from the planning figure. A model swap that changes output length changes the binding limit.
Should retries consume run budget?
Count them against the same slot and token budget, because the provider counts them too. Give each run a retry allowance so a failing run cannot spend its neighbours' capacity on repeats.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Concurrency limit per key

    Available with a plan

    The most requests a gateway key may have in flight at once, streams included; one more is refused until one finishes.

  • Runs

    Available with a plan

    Requests that share a trace id listed as one run each: requests, errors, duration, models, estimated provider cost, scores and prompt versions, filtered and sorted over a window of up to 31 days. In the API, the console, the management API and MCP, on every plan.

  • Usage and cost per request

    Available with a plan

    Every request records its model, latency, token or unit counts, and estimated provider cost, queryable by project and key.

    Read the documentation for Usage and cost per request
  • Health-aware routing

    Available with a plan

    Named routes use priority or weighted targets over your own connections, with health checks, retries and failover.

    Read the documentation for Health-aware routing
  • Automatic failover

    Available with a plan

    A route that times out or 5xxs before the response starts is retried elsewhere without your client seeing it.

    Read the documentation for Automatic failover

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Rate limits - Claude Platform Docs (opens in a new tab) — Anthropic. Accessed Nov 30, 2026.
  2. 2.Azure OpenAI in Microsoft Foundry Models quotas and limits (opens in a new tab) — Microsoft Learn. Accessed Nov 30, 2026.
  3. 3.Rate & spend limits - API reference (opens in a new tab) — INFRO. Accessed Nov 30, 2026.
  4. 4.Errors - API reference (opens in a new tab) — INFRO. Accessed Nov 30, 2026.
  5. 5.Runs - Observability (opens in a new tab) — INFRO. Accessed Nov 30, 2026.

About this article

Read on 30 Nov 2026: Anthropic's rate-limits page, Microsoft's Azure OpenAI quotas page, and INFRO's rate-limit, errors and runs docs. Per-call token sizes, latencies and shares in the examples are illustrative; no OpenAI limit page was read, so none is described.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.