[Telemetry + Bug Report] Why Antigravity weekly quotas burn so fast: Gemini 4 Carbon High mid-turn cache collapse (5.5x cost) + 5-min implicit cache cliff

I’ve been using Antigravity CLI (agy) heavily with Gemini 4 models and kept seeing sudden weekly quota drops. Instead of guessing, I pulled exact token telemetry (input_tokens, cache_read_tokens, output_tokens) from 3,060 consecutive call pairs across our Antigravity CLI transcripts (Nov 17–19, 2026).

There are two distinct caching issues that together multiply quota burn by 5×–10× in real interactive work.


Issue 1 (Bug): Mid-turn implicit cache collapse on gemini-4-carbon-high

In one uninterrupted 46-call agent turn on gemini-4-carbon-high (2026-11-19 12:21–13:01 UTC, 0 network errors and 0 retries in cli.log):

  • 30 of 46 calls returned cache_read_tokens = 0.
  • 9 consecutive calls at 436K–501K tokens got 0% cache hit.
  • Cache dropped to 0% even after 6s, 7s, and 15s gaps between sequential tool calls (e.g. Call #20: 7s gap → 0% hit on 245K; Call #26: 15s gap → 0% hit on 436K; Call #39: 6s gap → 0% hit on 59K).

API-equivalent cost of this single 40-min turn:

  • Actual: $16.69 (intro $2/$10) / $33.39 (standard $4/$20) — 7.79M uncached input vs 1.74M cached, 94K output.
  • Counterfactual (same 46 calls if cache had held): $3.03 / $6.07 → 5.5× cost blowup purely from cache misses.
  • Reference: Identical task run in parallel on GPT-6.2 Astra cost $3.10.

Why this is NOT a client/prefix mutation bug:

  1. The entire turn ran inside a single agy binary process with zero mid-turn intervention.
  2. Prompt length grew strictly monotonically across every HIT → MISS transition (only standard read_file/run_command tool results in between; no trimming). Whenever a call did hit, cache_read_tokens equaled prev_total + 1 (100% prefix match).
  3. On the exact same agy binary and tool setup (≤60s intra-turn gaps):
    • gemini-4-argon-medium: 99.5% hit rate (580/583)
    • gemini-4-hydrogen-high: 99.5% hit rate (568/571)
    • gemini-4-neon-medium: 96.6% hit rate (569/589)
    • gemini-4-carbon-high: 87.6% avg, collapsing to 34.8% (16/46) in this long run.

This strongly points to server-side replica/shard routing losing session stickiness on gemini-4-carbon-high.

(If a Google engineer wants to inspect server-side traces: conversation ID ca718c60-1375-49c5-b6ab-e78bc20816..., 2026-11-19 12:21–13:01 UTC, agy CLI.)


Issue 2 (Feature Request): No usable cache TTL for human-in-the-loop work

Across all 3,060 consecutive call pairs (same model, no compaction in between):

Pause since previous call Hit / Miss Hit rate
0–1 min 2,447 / 48 98.1%
1–3 min 139 / 29 82.7%
3–5 min 39 / 14 73.6%
5–8 min 18 / 28 39.1%
8–12 min 9 / 21 30.0%
12–15 min 40 / 194 17.1%
>15 min 0 / 34 0.0%

Implicit caching works well for tight automated tool loops on Argon/Hydrogen, but if a user pauses 5–15 minutes to read the model’s analysis/proposals and think, they pay for a full cold rebuild 61%–100% of the time.


Concrete asks

  1. Fix session/replica stickiness on gemini-4-carbon-high so intra-turn cache stops dropping to 0% after 6–15s.
  2. Add a guaranteed 1-hour cache TTL for interactive Antigravity sessions (this would make subscriptions effectively 5×–10× more usable for real human-in-the-loop workflows and would make me move my entire workflow to Gemini full-time).
  3. Make mid-turn auto-compaction threshold configurable in agy CLI (currently built-in compaction waits until ~500K tokens).

(Charts attached from the same telemetry dataset.)

Hi @Vellerok_Olitos, welcome to the forum!

Thank you for sharing this detailed token telemetry and your feedback on cache retention and compaction controls.

  • Update Antigravity CLI: Please check your current build and update to Antigravity CLI v1.5.13 , which includes the latest network retry fixes.
  • Manage Context Size Today: While the automatic compaction threshold isn’t currently configurable in CLI settings, you can run /compact on demand to summarize long sessions early (retaining tool declarations on summarization requests so the cached prompt prefix is reused), inspect token growth with /context, and use /clear between unrelated tasks.
  • Orchestrator Option: For multi-step work, you can also try Orchestrator (Carbon), where Gemini 4 Carbon handles planning while Gemini 4 Hydrogen handles implementation (Choose a model).

Please let us know which agy version you used and whether the intra-turn cache drops continue on v1.5.13 so we can look into this further.