Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Antigravity usage limits probe prefers stale legacy acp_token.json over active antigravity-oauth-token on managed runtime 1.5.13 #40348

ClosedPonkoKobo(GitHub profile, opens in a new tab) opened this issue 1 comment

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

  1. Start with a sign-in from Antigravity <1.5.0 that created <stateDir>/providers/antigravity/<instance>/antigravity-acp/acp_token.json with, for example, project_id: "aicode-consumers".
  2. Upgrade to T3 Code 0.1.11 with the managed Antigravity ACP 1.5.13 runtime. Leave binaryPath empty.
  3. Sign in with oauth-personal. Confirm that both antigravity-oauth-token and the old acp_token.json exist in the same profile directory.
  4. 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

  • makeAntigravityUsageProbe in apps/server/src/provider/antigravityUsageLimits.ts checks whether acp_token.json exists before it looks for antigravity-oauth-token. When the legacy file exists, the probe uses its credential and sends its project_id as project: "aicode-consumers" in quota requests. It refreshes the legacy credential through POST https://oauth2.googleapis.com/token when 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.logout calls the ACP runtime's logout, and the old acp_token.json remains on disk.
  • #39112 added the new file as a fallback when acp_token.json is absent. #34381 covers a manually configured agy binary, #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.

  1. tanstack-source added labelsbug

  2. 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.

  3. juliusmarminge closed this

Sign in to join this conversation.