◉ANTIGRAVITY LABJP
Articles/AI Tools
⚙ AI Tools/2026-06-13Advanced

Parallel Agents Quietly Burn Through Your Quota — A Self-Defense Circuit Breaker When Limits Are Invisible

Even on AI Ultra's high ceiling, running parallel agents can exhaust your allowance without warning and leave later runs half-failing. Assuming the limit is invisible from outside, here is a circuit breaker that records consumption on your side and applies the brakes, drawn from real operation.

ai-tools16rate-limitingcircuit-breaker3parallel-execution7quota10

✦ Premium Article

I once watched the third through fifth of five parallel agents all stall out with half-finished output.

As an indie developer running several sites and apps in parallel, I upgraded to AI Ultra thinking I could finally run agents side by side without worrying about limits. Then on a day when I threw a batch of heavy jobs in the morning, only the later agents ran partway and returned thin results without any clear error. At first I blamed the model; but moving to a different time of day, it did not reproduce. I had used up the allowance in a short window.

The tricky part was that this exhaustion did not arrive in the easy-to-read form of "returns a 429 and stops." This article lays out a design for building a brake on your own side, assuming the limit is invisible from outside.

Quota exhaustion does not arrive as a clear error

When we hear "rate limit," we picture an HTTP 429 that a retry fixes. With agentic tools, that is not always how it goes.

In operation, exhaustion showed up in roughly three patterns. The first is mid-run quality degradation: in a multi-step job, the early steps proceed normally and only the later steps produce short, shallow output. The second is silent truncation: the agent reports "complete," yet the artifact is only partway done. The third is perceptible slowdown: responses get extremely slow and fail at the timeout boundary.

What they share is that none carries an explicit "you used up your quota" signal. Top-tier plans like Ultra have a high ceiling, but exactly how much remains is not visible from outside. That is precisely why a reactive approach relying on error codes is too slow. Rather than stopping after you detect exhaustion, stop yourself before exhaustion. That is the circuit-breaker idea.

Estimate and record consumption on your side

If you can't see the remaining balance from outside, you have to count what you dispatch. You cannot get exact token counts, but an approximation is enough. I append a rough estimate of "one agent run = approximate tokens" to a file on each run.

# record_usage.sh <weight>
# Accumulate the day's consumption in approximate-token weights (reset per day)
DAY="$(TZ=Asia/Tokyo date +%F)"
LEDGER="$HOME/.agent_quota/${DAY}.tally"
mkdir -p "$HOME/.agent_quota"
 
WEIGHT="${1:-1000}"   # approximate weight of this run (heavier generation = larger)
echo "$WEIGHT" >> "$LEDGER"
 
TOTAL="$(awk '{s+=$1} END{print s+0}' "$LEDGER")"
echo "Today's running total (approx): $TOTAL"

The weights need not be exact. Decide relative magnitudes — light triage 500, a normal article generation 3000, a heavy job with a browser subagent 8000 — and you can grasp how tall a day's consumption peak is. I fix the date with TZ=Asia/Tokyo to avoid the date boundary slipping and overwriting the previous day's ledger.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Understand why quota exhaustion shows up not as a clear error but as mid-run quality degradation and silent failure
✦Build a self-defense circuit breaker in bash that estimates and records consumption and halts agent dispatch at a threshold
✦Learn how to draw a token budget that spreads a day's work without hitting exhaustion in an environment with opaque limits
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⚙ AI Tools2026-09-14
The October 16 date I could not find — taking stock of Gemini model shutdown dates yourself
A widely repeated shutdown date for the Gemini 2.5 family is not on the official deprecations page. Here is how I pull every model ID out of a repository and reconcile it against a ledger I maintain myself, with working scripts.
⚙ AI Tools2026-10-29
A 54-Line Front Door for the Days I Can't Decide Between agy and gemini-api
The Gemini API CLI (gemini-api) landed in beta on October 27. Here is a small shell script that sends repo-editing requests to the Antigravity CLI (agy) and read-only requests to gemini-api, including the 14 MB input ceiling, exit codes 0-3, and timeout's 124, all checked with stubs.
⚙ AI Tools2026-10-24
When All You See Is "An Error Occurred": Suspect a 429 First, and Check in This Order
How to tell whether a generic Antigravity error is really a usage limit (HTTP 429) or a network or sign-in problem. Open the debug details, wait the right way, and skip the retry spiral. A sequence a non-engineer can follow.