AI agent limits: Who stops parallel tool calls?

A technical control should check an AI agent's runtime, cost and action limits before each tool dispatch. Parallel steps and subagents need to share the same task budget. If two calls compete for the last permitted write attempt, only one should receive it. A prompt instruction or a counter updated after execution cannot prevent the second action.
This article proposes an architecture and testing method for a bounded agent workflow. All numbers and events in the example are fictional; no customer or provider systems were tested for it. Sources checked on 26 November 2026.
Four limits that address different failures
Define what each workflow counts and what happens when a limit is reached. “At most ten steps” is ambiguous if a step can trigger several tool calls, retries or subagents.
| Limit | What it should constrain | What it cannot prevent by itself |
|---|---|---|
| Overall deadline | Time from receipt to a defined completion state, including waits and retries | A dispatched operation may still take effect after the deadline. |
| Call and concurrency limits | Total outbound attempts and calls currently in progress | A small number of calls can still have costly or prohibited effects. |
| Action limit | A specific permitted effect, such as at most one attempt to create a draft | That attempt must still be limited to approved targets and fields. |
| Cost budget | Reserved and consumed resources across models, tools and subagents | An estimate alone cannot guarantee the final bill. |
OWASP's Unbounded Consumption guidance recommends measures including quotas, timeouts, resource monitoring and limits on queued and total actions. Turn those measures into observable rules for your particular workflow.
Permissions remain a separate boundary. Permission to attempt a write is not permission to make any change. OWASP Excessive Agency recommends restricting tools, their functions and their permissions. A small call counter does not turn an unrestricted shell tool into a narrowly scoped business action.
Check shared limits before dispatch
My recommendation is a shared server-side control. It verifies the technical identity, permitted task, current deadline and available budgets. Checking and reserving capacity must be protected together against concurrent access: two callers must not both receive the same remaining allowance.
A shared boundary for parallel tool calls
- 01
Agents and subagents
Propose actions under the same task ID assigned by trusted application logic.
- 02
Shared control
Checks permissions, deadline and budget; reserves the permitted attempt before dispatch.
- 03
Scoped target tool
Performs only the approved operation and exposes a state that can be checked.
The model must not be free to invent a new task ID to obtain a fresh budget. Subagents inherit the appropriate association. A restart, queue or different worker must not silently reset consumed capacity.
Include retries inside client libraries and gateways. If a lower layer sends additional attempts invisibly, a counter above it does not fully constrain actual calls. Bound that execution path or record the gap explicitly. Shared time budgets for LLM fallback covers the narrower case of model-provider failover.
Fictional example: two workers, one write attempt left
An agent may read information and create at most one internal draft. External messages, changes to existing master data and deletions are not permitted in this example workflow.
The invented limits are an overall deadline of 90 seconds, at most six dispatched tool attempts, at most two concurrent calls and at most one write attempt for the draft. Every dispatched attempt counts, even if its response is lost. These are illustrative values, not general recommendations.
After four completed read calls, two workers propose creating the draft simultaneously:
| Point in the sequence | Overall budget | Write budget | Decision |
|---|---|---|---|
| Before both proposals | 4 of 6 attempts consumed | 0 of 1 consumed or reserved | Both proposals concern the same task. |
| Worker A receives a reservation | One further attempt is reserved for A | The only write attempt is reserved for A | Only A may dispatch the approved write attempt. |
| Worker B is checked | A's reservation is taken into account | No further write attempt is available | B sends no write request. |
| A dispatches, but no response arrives | 5 of 6 attempts consumed | 1 of 1 consumed; effect unresolved | No new write attempt; reconcile the target state. |
A naive implementation could tell both workers that one write attempt remains and update the count later. That could allow two write requests in this example. The shared reservation is intended to prevent that race. Its atomic implementation depends on the storage system and its transaction or comparison operations; an independent read followed by a write is insufficient.
A's unresolved outcome is not an available budget slot. The agent must not create a new task and repeat the same operation there either. Continuing requires a reconciled target state and the designated approval. The guide to MCP write access and ambiguous results discusses that distinction in more detail.
Distinguish cost estimates from enforceable upper bounds
A cost alert after execution does not limit a request already dispatched. Where a defensible bound is available, reserve the maximum remaining resource use before starting another action, then reconcile actual consumption. Include every participating model and paid tool.
If the interface cannot provide a reliable upper bound, or usage data arrives late, the cost figure remains an estimate. Label it as a soft limit and combine it with enforceable call, concurrency and runtime boundaries. Do not promise a hard monetary cap that the execution path cannot demonstrably enforce. The example above deliberately makes no pricing or cost guarantee.
A stop must expose the state of in-flight actions
Distinguish at least: new requests blocked, cancellation requested, operation confirmed stopped and effect unresolved. A visible “stopped” status must not conceal an outstanding write.
MCP describes cancellation as optional. Receivers may ignore a cancellation notification when processing has already finished or the request cannot be cancelled. A cancellation signal alone therefore does not establish that the target state has been rolled back. Task-augmented MCP requests use a separate cancellation mechanism in that specification version.
When a workflow stops at a limit, retain the task ID, consumed and reserved budgets, outstanding requests, last known target state and permitted next action. A confirmed technical block and an unknown business outcome are different findings.
Six acceptance tests for the shared limit
These are proposed tests using synthetic data and controlled target tools, not completed integration tests.
| Injected condition | Expected evidence |
|---|---|
| Two workers compete for the last write attempt simultaneously | Exactly one reservation and at most one actual write dispatch |
| A subagent requests a new task ID | No independent budget renewal or bypass of task assignment |
| A worker restarts after an interruption | Consumed capacity and outstanding reservations remain effective. |
| The deadline expires before the next dispatch | No further dispatch; traceable completion reason |
| A write response is lost after dispatch | No automatic new write attempt; unresolved effects remain visible. |
| A client library attempts additional retries | Actual attempts are limited, or the uncovered layer is documented as a blocker. |
Count requests actually accepted by the controlled target. A matching internal counter alone does not prove that a second request never reached it.
Next step: make two workers compete for the last slot
Start with one specific, narrowly permitted action. Have two controlled workers request the last available slot simultaneously. Check the reservation, actual dispatch and target state separately. Then add restart and lost-response cases.
For an agent pilot approaching production, this fits the AI Production Readiness & Reliability Sprint: one workflow, its shared limits and the relevant parallel execution. Describe the target system, permitted effect and boundary currently expressed only in a prompt or after-the-fact monitoring.