Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Antigravity 5-hour limit still shows ~99–100% left when its weekly limit is exhausted (0%) #48279

Openalexgunsberg(GitHub profile, opens in a new tab) opened this issue 0 comments

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. Sign in to an Antigravity (oauth-personal) provider instance whose Gemini (or Claude/GPT) weekly quota has reached 0% remaining.
  2. Run antigravity usage --json (managed Antigravity runtime >= 1.5.22) and inspect the gemini-5h bucket.
  3. 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

  1. antigravityUsageOutputToLimits in apps/server/src/provider/antigravityUsageLimits.ts does not decode or check disabled: true on UsageBucket, so it still emits the gemini-5h window with usedPercent: (1 - 0.98998...) * 100 ≈ 1% (99% left).
  2. poolMember() in packages/shared/src/usageLimits.ts (lines 635–645) only clamps kind === "session" windows to usedPercent: 100 for claudeAgent (window.id === "seven_day") and codex (window.kind === "weekly"), not antigravity (where gemini-5h is blocked by gemini-weekly and 3p-5h by 3p-weekly).
    • Note also that when gemini-5h is disabled by weekly exhaustion, agy usage --json omits reset_time, so sessionReset is null in poolMember() (lines 654–670); using spentWeekly.resetsAt with refillPercent = 100 when the 5-hour bucket has no reset clock would also let the restore indicator reflect when the group becomes usable again.

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.

  1. tanstack-source added labelsbug

Sign in to join this conversation.