Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
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 ( |
Problem
Antigravity usage limits can stay stuck at
100% left(falling back toReported quotawith a rolling4h 59mreset) or show another Google account's limits whenever an upgraded profile still has a leftoverantigravity-acp/acp_token.jsonalongside the 1.5.xagyCLI'santigravity-oauth-token.makeAntigravityUsageProbecheckedfs.exists(acp_token.json)first, so any profile carrying a pre-1.5acp_token.jsonalways refreshed and queried Google with that stale credential instead of the active CLI sign-in. When the stale account returned403 PERMISSION_DENIED(VALIDATION_REQUIRED) onretrieveUserQuotaSummary, the probe silently fell back tofetchAvailableModelsand reported100% leftacrossGemini / Claude / GPT · Reported quota.Change
acp_token.jsonOAuth refresh path and its refreshed-token cache (clear) frommakeAntigravityUsageProbeinapps/server/src/provider/antigravityUsageLimits.ts(T3 Code already refuses pre-1.5 Antigravity runtimes that wrote that file).makeAntigravityUsageProbenow reads onlyantigravity-oauth-token(or the OS keyring foroauth-businesswhen no file is present), ignoring any leftoveracp_token.json.clearUsagewiring inapps/server/src/provider/Drivers/AntigravityDriver.ts.apps/server/src/provider/antigravityUsageLimits.test.tsto test CLI sign-in probes directly, verify distinctAuthorizationheaders across sign-in changes, and cover leftoveracp_token.jsonalongside valid, expired, and absent CLI credentials.Scope
Fixes #40015 and #34381. Supersedes the stalled #39544 with live-profile verification.
Verification
agy 1.5.16,oauth-personal): Against a real profile containing both a leftoveracp_token.json(which returned403onretrieveUserQuotaSummaryand fell back to100%Reported quota) and a freshantigravity-oauth-token, running the patchedmakeAntigravityUsageProbereturned all 4 summary windows from the active account (Gemini · 5-hourat 15.12% used,Gemini · Weeklyat 5.35% used,Claude & GPT (shared) · 5-hourandWeeklyat 0% used) with real reset timestamps whileacp_token.jsonremained untouched on disk.vp run check:changedpassed (format,lint,knip2/2,graphql,typecheckacross 3 packages, andvp testacross 3 files: 31 passed, 1 Windows-only keyring test skipped on Linux).agy 1.5.16(tracked separately in [Bug]: Antigravity 1.5.16 breaks isolated file token storage & usage limits (expects AGY_CLI_FORCE_FILE_TOKEN_STORAGE instead of AGY_ACP_FORCE_FILE_STORAGE / SSH_CONNECTION) #41973 / fix(server): Antigravity 1.5.16 Google sign-ins stay in profile storage #41982).Before (with
acp_token.jsonshadowingantigravity-oauth-token)After (this branch, with
acp_token.jsonstill present on disk)Prepared with Gemini 4 Neon via Antigravity in T3 Code.