[Bug]: Antigravity Limits stop updating an hour after the last turn and falsely report an expired sign-in
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Use a fresh Antigravity instance signed in with a Google account on the 1.5.x CLI.
- Run one Antigravity turn, such as "Reply with the word ok." Open Usage → Limits and click Refresh limits if needed. The Antigravity windows show.
- Wait a little over one hour. Do not start another Antigravity turn or refresh provider status.
- Click Refresh limits.
- Quit and reopen T3 Code (or restart the T3 server on that machine), then open Usage → Limits again.
Expected behavior
Limits stay current while the instance is signed in, with no extra Antigravity turn each hour. Limits never say the sign-in expired when it has not.
Actual behavior
After step 4, the refresh fails and Limits keep the last reading, so the numbers go stale with no sign of it. After step 5, Limits show:
Antigravity's saved sign-in has expired. Start an Antigravity turn to renew it, then refresh limits.
The sign-in has not expired. Only the 1.5.x CLI's one-hour access token has, and the next turn works with no new sign-in. Limits never renew that token, so they are current only until it expires, at most an hour after the last Antigravity CLI session on that machine (a turn or a provider status refresh). T3 cannot renew the token itself, but the CLI can. Settings → Providers → Refresh provider status starts a short CLI session, the token renews with no chat turn, and Limits then read fine.
Related: #38957 added this path and message. Open PR #39740 re-reads Limits when a session starts, so Limits recover right after a new turn. Not a duplicate of #34381: the stale reading is covered by open PR #34389, which shows failed reads as failed. This issue is why the read fails: with #34389 merged, this message would show an hour after the last CLI session, not only after a restart. Open PR #39544 removes the older pre-1.5 token refresh. None of them renews the 1.5.x CLI token.
Impact
Major degradation or frequent failure
Version or commit
0.1.12-nightly.20261121.5024; the same code is on main @ 13226b1. It has worked this way since #38957. Before that, Limits did not show for this sign-in at all.
Environment
T3 Code Nightly desktop on macOS arm64 and Linux x86_64. Managed Antigravity CLI 1.5.13, Google account sign-in (personal). Stale numbers seen on Linux; the message seen on macOS after a server restart.
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
On that machine, click Settings → Providers → Refresh provider status, then Refresh limits if the numbers did not change. No chat turn is needed. It lasts one hour.
Seeing the same issue on Windows with multiple Antigravity instances (3 Google accounts), with an extra multi-account symptom in Usage → Limits:
Environment
- OS: Windows (x64)
- T3 Code:
0.1.11 - Provider: Antigravity
v1.5.13(3 instances, all signed in via Google account)
Behavior
- Open T3 Code.
- Open Usage → Limits.
- Under Antigravity, only 1 account's quota bar renders (no segmented per-account breakdown and no error banner indicating the other accounts failed to load).
- Go to Settings → Providers and click Refresh providers.
- Reopen Usage → Limits — all 3 Antigravity accounts immediately appear as segmented bars in each quota row (
Gemini · 5-hour,Gemini · Weekly,Gemini 4 Argon · Weekly,Claude & GPT (shared) · 5-hour,Claude & GPT (shared) · Weekly).
So in a multi-account setup, accounts whose 1-hour CLI access token has expired appear to be silently omitted from the combined Usage → Limits bars until Refresh providers is manually triggered.
Written by Gemini 4 Neon (Antigravity) in T3 Code.
Hitting this as well on Windows with 4 Antigravity Google OAuth accounts. Adding a couple of extra details from tracing the server logs (server.trace.ndjson) and inspecting the compiled server bundle:
Environment
- OS: Windows (x64)
- T3 Code:
0.1.11(59651c1761f6) - Provider: Managed Antigravity CLI
v1.5.13(4 Google OAuth instances)
Observed behavior in logs
- Between
17:22:30and17:41:59(including manual Refresh limits clicks),AntigravityUsageProbeonly sentPOST /v1internal:retrieveUserQuotaSummaryfor 1 of the 4 accounts (the one used within the last hour). - The other 3 accounts had expired 1-hour
antigravity-oauth-tokenfiles, somakeAntigravityUsageProbereturnedreason: probeFailed. - Because
resolveUsageLimitsAfterProbekeeps the previous non-unavailablepublishedreading onprobeFailed, all 3 idle accounts silently stayed frozen on stale cached bars (even across 5h/weekly resets) with no indication in Usage → Limits that their readings were outdated. - Additionally, in
AntigravityProvider.onSessionStarted, an immediaterefreshUsage()is only triggered when!before.draft.usageLimits || before.draft.usageLimits.unavailable. Because the stale reading masks theprobeFailedstate, starting a session on one of those accounts doesn't immediately refresh its limits either—you still wait until the next 5-minute poll or manual refresh. - Immediately after renewing the 3 idle accounts' tokens, all 4 accounts resumed hitting
retrieveUserQuotaSummaryon the next poll (17:42:30).
Possible fix
Since antigravity-oauth-token doesn't include OAuth client credentials for T3 Code to refresh directly, makeAntigravityUsageProbe (when expiry <= now + 60s) could trigger a lightweight, zero-quota agy acp --gemini-dir <profile> --app-data-dir antigravity-acp handshake (initialize + session/new, no prompt sent, cleaning up the empty session via removeAntigravitySessionFiles) before calling retrieveUserQuotaSummary. In testing locally this takes ~1.2s, uses 0% model quota, and renews antigravity-oauth-token on disk so all accounts stay current without needing a chat turn every hour.
Same thing on a single-account Windows setup (0.1.11, Antigravity CLI 1.5.13), and it stayed silently frozen for 12+ hours across an actual quota reset.
My 3p-5h bar was stuck at 99% (with an already-past resetsAt from 00:25), even though an overnight delegated Claude turn ran after the reset and consumed ~4% of 3p-weekly. Manual refreshes didn't update anything until I sent a new Antigravity turn to renew the token and waited for the next 10-min poll, at which point 3p-5h jumped straight to 0% and 3p-weekly finally updated.
+1 on #40474, #34389, and #39740 — together they'd cover this completely.
Confirming this still reproduces on 0.1.12-nightly.20261122.5111 (Linux x64) with agy 1.5.15 in a two-account Antigravity setup, and it caused a particularly confusing multi-account failure mode across Google's Nov 23 out-of-band Gemini quota reset:
- The active account (
antigravity, continuously renewing its 1-hourantigravity-oauth-token) updated cleanly after the reset (95% left,resetsAt7d out). - The idle standby account (
antigravity-2) had itsantigravity-oauth-tokenexpire at08:08:50Z(1 hour after its last run), so itsusageLimits.checkedAtstayed frozen at08:06:05Z(13.5 hours stale) with its pre-reset97.25% usedweekly reading and expired morning 5hresetsAttimestamps. - In Usage → Limits, the stale 2% bar stayed silently averaged into the combined Gemini Weekly headline (
49% left) with no stale indicator, making it look like the second account hadn't reset.
+1 on landing #34389 (so stale failed reads stop blending silently into live numbers/averages) and #39740.
One nuance worth noting for #40474 in multi-account setups: users who keep multiple Antigravity accounts strictly serial per host (never running two consumer Google accounts concurrently from the same IP) may not want an hourly background initialize + authenticate + quota poll firing for idle standby accounts while another Antigravity account is actively running on the same machine. Making background renewal for idle accounts opt-in or gating it to explicit Refresh / idle host would avoid unintended concurrent per-IP account activity while still fixing single-account staleness.
Closing this: #43026 removed the Antigravity usage-limit reads entirely. The Antigravity team confirmed that only ACP is supported for external clients and that calling internal APIs (cloudcode-pa.googleapis.com/v1internal) can flag a user's account, so T3 Code no longer shows Antigravity limits, locally or from CLIProxyAPI hubs. They will come back only if Antigravity exposes them over ACP.