[Bug]: Antigravity 5-hour limit still shows ~99–100% left when its weekly limit is exhausted (0%) #48279
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#
- Sign in to an Antigravity (
oauth-personal) provider instance whose Gemini (or Claude/GPT) weekly quota has reached0%remaining. - Run
antigravity usage --json(managed Antigravity runtime>= 1.5.22) and inspect thegemini-5hbucket. - Open Usage → Limits in T3 Code.
Expected behavior#
When a model group's weekly limit is exhausted (0% left) and agy usage --json marks the corresponding 5-hour bucket "disabled": true (omitting reset_time), Usage → Limits should show that account's 5-hour window for that model group as 0% left / unavailable (consistent with how Claude and Codex clamp exhausted session windows when the weekly window is spent), rather than inflating the 5-hour pool average with 99%–100% left.
Actual behavior#
antigravityUsageOutputToLimitsinapps/server/src/provider/antigravityUsageLimits.tsdoes not decode or checkdisabled: trueonUsageBucket, so it still emits thegemini-5hwindow withusedPercent: (1 - 0.98998...) * 100 ≈ 1%(99%left).poolMember()inpackages/shared/src/usageLimits.ts(lines 635–645) only clampskind === "session"windows tousedPercent: 100forclaudeAgent(window.id === "seven_day") andcodex(window.kind === "weekly"), notantigravity(wheregemini-5his blocked bygemini-weeklyand3p-5hby3p-weekly).- Note also that when
gemini-5his disabled by weekly exhaustion,agy usage --jsonomitsreset_time, sosessionResetisnullinpoolMember()(lines 654–670); usingspentWeekly.resetsAtwithrefillPercent = 100when the 5-hour bucket has no reset clock would also let the restore indicator reflect when the group becomes usable again.
- Note also that when
As a result, an account with 0% Gemini weekly quota remaining still shows 99% left on Gemini Models · 5-hour and inflates the pooled 5-hour percentage.
Impact#
Minor bug or occasional failure
Version or commit#
0.1.14-nightly.20261203.5651 (reproduced on main @ 4b8199987c)
Environment#
Linux ARM64 server + macOS Electron desktop (0.1.14-nightly.20261203.5651), Antigravity (oauth-personal)
Logs or stack traces#
{
"status": "SUCCESS",
"response": "Gemini Models\tWeekly Limit Remaining\t0%\t2026-12-08T11:55:08Z\nGemini Models\tFive Hour Limit Remaining\tdisabled\t\nClaude and GPT models\tWeekly Limit Remaining\t10%\t2026-12-04T16:32:52Z\nClaude and GPT models\tFive Hour Limit Remaining\t100%\t1970-01-01T00:00:00Z\n",
"command": {
"name": "usage",
"data": {
"groups": [
{
"name": "Gemini Models",
"buckets": [
{
"id": "gemini-weekly",
"name": "Weekly Limit Remaining",
"description": "You have hit your weekly limit, it refreshes in 4 days, 21 hours. If on a supported paid plan, you can use AI credits in the interim or upgrade to a higher tier.",
"window": "weekly",
"remaining_fraction": 0,
"reset_time": "2026-12-08T11:55:08Z"
},
{
"id": "gemini-5h",
"name": "Five Hour Limit Remaining",
"description": "You have hit your weekly limit, the 5-hour limit does not currently apply. Your weekly limit will fully refresh in 4 days, 21 hours.",
"window": "5h",
"disabled": true,
"remaining_fraction": 0.9899866580963135
}
]
}
]
}
}
}
Workaround#
None; check the Weekly row to see whether the pool is actually exhausted.
tanstack-source added labelsbug
Sign in to join this conversation.