Antigravity Weekly Quota Driven by 5-Minute Prompt Cache Expiry

·2026.11.20 08:38

Key point

Binary analysis reveals a hardcoded 4m 45s staleness cutoff in Antigravity's keep-alive logic, causing full context reprocessing after 5 minutes of inactivity.

Details

  • Google Antigravity's implicit prompt cache expires after 5 minutes of inactivity, causing full context reprocessing and rapid weekly quota consumption.
  • Binary analysis of the language_server and agy CLI identified a hardcoded 4m 45s (285s) staleness cutoff and a 4m 30s (270s) keep-alive ping interval in modelapiccpa/keepalive.go.
  • The native keep-alive mechanism is currently disabled for Gemini models by two gates: a server-side Mendel flag (enable-prompt-cache-keep-alive) and a provider enum check that excludes Gemini.
  • Patching these gates enables background pings that refresh the cache TTL, reducing effective token costs by 29-36% for 16.8k token contexts and preventing 133,065 token penalties in 150k token sessions.
  • A single 5-word prompt consumes approximately 16,816 tokens due to system instructions, tool schemas, and MCP servers, making cache misses expensive.
  • The /btw side-question feature creates a new conversation ID and incurs a cold start cost (21,325 effective tokens), making it 4.9x more expensive than a standard warm ping for cache maintenance.
  • Maximum ping budget is 3 for 16.8k contexts (18-minute coverage) and 7 for 150k contexts (31.5-minute coverage) to avoid exceeding the cost of a cold miss.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.