Quanta

← Back to Briefings

A 20-Call Cap for Teams Running Agents at Scale

Cost at volumeEN5 reads

01 · A retry loop becomes a budget decision

An agent inspects a repository, edits a file, runs a test, and tries again. That cycle is useful until the test cannot pass because a dependency is unavailable, the acceptance criteria conflict, or the agent keeps undoing its own changes. Without an enforceable stop condition, persistence becomes an open-ended purchase order.

For teams running heavy workloads, the exposure is not one unusually long session. It is the same failure pattern repeated across concurrent jobs. A hypothetical 20-call cap makes that exposure easier to reason about, but call count alone is not a complete budget: individual calls can differ substantially in context size, output length, and tool activity.

02 · Every extra turn carries more than output tokens

A loop can accumulate conversation history, tool results, error logs, and repeated instructions. If the application resends growing history, later turns may process more input than earlier ones. Even short answers can therefore belong to expensive runs.

Separate the costs before deciding whether an agent is efficient:

  • › Model usage: input and output tokens across every attempt, including failed attempts and model-based evaluations.
  • › Cache activity: cache writes and reads, accounted for separately rather than treated as free context.
  • › Tool execution: compute, external services, test environments, and any chargeable side effects.
  • › Operational drag: occupied worker slots, growing queues, delayed results, and engineer time spent investigating.

Caching can reduce the expense of reused context under the applicable pricing, but it does not make an unproductive loop valuable. A cheaper repeated mistake is still a repeated mistake.

03 · Put the stop policy outside the prompt

Asking an agent to “stop when finished” is guidance, not enforcement. The controller that schedules model calls and tools should own the limits. Start with explicit acceptance criteria: a named test passes, a required artifact exists, or a bounded checklist is satisfied. Where possible, verify completion with deterministic checks rather than the agent’s own declaration.

Then enforce several independent boundaries:

  • › Call limit: cap total model calls, including retries, evaluators, and delegated agents.
  • › Usage budget: track token categories and estimated spend, reserving headroom for calls already in flight.
  • › Time limit: impose a wall-clock deadline and separate timeouts for tools that may hang.
  • › No-progress limit: stop after repeated equivalent failures or unchanged validation results.
  • › Side-effect limit: require approval before repeated writes, deployments, messages, or other consequential actions.

Use one shared budget for the parent job and its descendants. Otherwise, each worker can remain within its local allowance while the overall task exceeds its intended envelope. Cancellation must propagate to child jobs and tools where supported; blocking the next model call does not stop work already running.

04 · Make the 20-call ceiling produce a useful handoff

Treat 20 calls as an illustrative rollout ceiling, not a universal recommendation. Choose limits from observed task behavior and acceptable financial exposure. Distinguish transient infrastructure failures from reasoning failures: an unavailable service may warrant bounded retries with backoff, while repeated identical edits should trigger escalation.

Before exhaustion, preserve a checkpoint: changes made, checks completed, remaining failures, and the reason for stopping. Make side-effecting operations idempotent where possible so retries do not duplicate actions. A stopped run should leave a reviewable result, not a mystery or an automatic restart that silently resets its allowance.

05 · Use metering to govern sustained traffic

Quanta fits teams that want pay-as-you-go access to models such as Claude Sonnet 5.5 and Gemini 2.5 Flash through one balance. Calls are metered on real tokens, with cache writes and cache reads priced separately. Open a Quanta account to consolidate model access, while keeping stop enforcement in your own orchestration layer.

Review cost per accepted result alongside completion rate, retry depth, stop reasons, and queue delay. Stage rollouts with bounded concurrency and explicit approval for higher limits. The objective is not the longest autonomous run; it is a useful, verified result within an exposure the team deliberately accepts.