[Bug]: Antigravity usage limits probe prefers stale legacy acp_token.json over active antigravity-oauth-token on managed runtime 1.5.13 #40348
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Start with a sign-in from Antigravity <1.5.0 that created
<stateDir>/providers/antigravity/<instance>/antigravity-acp/acp_token.jsonwith, for example,project_id: "aicode-consumers". - Upgrade to T3 Code 0.1.11 with the managed Antigravity ACP 1.5.13 runtime. Leave
binaryPathempty. - Sign in with
oauth-personal. Confirm that bothantigravity-oauth-tokenand the oldacp_token.jsonexist in the same profile directory. - Run Antigravity turns until the Antigravity desktop app shows quota consumption. Open Usage → Limits in T3 Code and click Refresh.
Expected behavior#
Usage → Limits should use the active antigravity-oauth-token and show the same quota as the Antigravity desktop app. For this account, that includes both 5-hour windows, the weekly windows, a separate Gemini 4 Argon weekly window, and reset timestamps.
Actual behavior#
makeAntigravityUsageProbeinapps/server/src/provider/antigravityUsageLimits.tschecks whetheracp_token.jsonexists before it looks forantigravity-oauth-token. When the legacy file exists, the probe uses its credential and sends itsproject_idasproject: "aicode-consumers"in quota requests. It refreshes the legacy credential throughPOST https://oauth2.googleapis.com/tokenwhen needed.- T3 Code displays only Claude & GPT (shared) · Weekly: 100% left and Gemini · Weekly: 100% left. Both 5-hour windows, the Gemini 4 Argon weekly window, and the reset times are missing.
- Signing out and back in leaves the behavior unchanged.
AntigravityAuth.logoutcalls the ACP runtime's logout, and the oldacp_token.jsonremains on disk. - #39112 added the new file as a fallback when
acp_token.jsonis absent. #34381 covers a manually configuredagybinary, #39828 describes a similar stale-file problem with Linux keyring credentials, and #40015 reports similar symptoms on macOS. This case reproduces on Windows with the default managed runtime and both credential files present.
Suggested fix: Prefer antigravity-oauth-token when present for the managed 1.5.x runtime. Retire the legacy file after successful migration and clear it on sign-out so it cannot become the active probe credential again.
Impact#
Major degradation or frequent failure
Version or commit#
0.1.11 (commit 59651c1761f6)
Environment#
Windows x64, T3 Code Desktop 0.1.11, managed Antigravity ACP 1.5.13, authMethod: oauth-personal, empty binaryPath.
Logs or stack traces#
Sanitized trace summary from the same profile before and after moving the legacy file aside.
acp_token.json present
POST https://oauth2.googleapis.com/token
retrieveUserQuotaSummary
3p-weekly usedPercent: 0
gemini-weekly usedPercent: 0
acp_token.json moved aside, then Refresh
retrieveUserQuotaSummary
3p-5h
gemini-5h usedPercent: ~17.7 resetsAt: present
3p-weekly
gemini-argon-wtu-weekly
gemini-weekly usedPercent: ~5.06 resetsAt: present
Screenshots, recordings, or supporting files#
No response
Workaround#
Rename acp_token.json to acp_token.json.bak in <stateDir>/providers/antigravity/<instance>/antigravity-acp/, then click Refresh in Usage → Limits. This switched the probe to antigravity-oauth-token and populated all five quota windows with live percentages and available reset timestamps. A restart was unnecessary.
tanstack-source added labelsbug
juliusmarminge closed this
Sign in to join this conversation.
This is the same problem as #34381, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.