[Bug]: Usage → Limits refresh does not refresh Antigravity quotas within 5 minutes (no checkUsageLimits + throttled async probe) #48280
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#
- Configure an Antigravity (
oauth-personal) provider instance and open Usage → Limits (which triggers a usage poll viaagy usage --json). - Run a turn on that Antigravity account that consumes quota (e.g. draining the last 1% of Gemini Weekly from
1%down to0%). - Within 5 minutes of the previous poll, open Usage → Limits or click the Refresh limits button (
server.refreshProviders({ limitsOnly: true })).
Expected behavior#
An explicit limits refresh (server.refreshProviders({ limitsOnly: true })) should run antigravity usage --json without being blocked by the 5-minute background health-check throttle, await the result, and publish the updated usageLimits without needing a full ACP health check round-trip.
Actual behavior#
Clicking Refresh limits within 5 minutes of the last poll leaves stale Antigravity numbers in the UI (for example, showing 1% left when antigravity usage --json reports 0%), and even after 5 minutes it runs an extra ACP health check and returns the stale snapshot first:
makeManagedServerProviderinapps/server/src/provider/AntigravityProvider.ts(lines 470–488) does not passcheckUsageLimits.- When
server.refreshProviders({ limitsOnly: true })invokesManagedServerProvider.refreshUsage(), the absence ofinput.checkUsageLimitscauses it to fall back toapplySnapshotBase(settings, { forceRefresh: true })→checkProvider(). checkProvider()(line 458) callsrefreshUsage(true)(throttled byUSAGE_REFRESH_INTERVAL_MS = 5 * 60_000, line 58 & 337–343), which silently returns without probingagy usage --jsonif< 5 minuteshave elapsed.- Even when unthrottled,
refreshUsageforksoptions.probeUsageasynchronously inusageReadandcheckProvider()immediately returns the previoususageLimits. When the async probe later updatesmetadata,publishEnrichedSnapshotpreserves the oldstate.snapshot.usageLimits, so the new quota only appears afterrepublishruns a second fullmanaged.refresh(checkProvider()).
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#
# AntigravityProvider.ts
# - line 58: const USAGE_REFRESH_INTERVAL_MS = 5 * 60_000;
# - line 458: if (initialized !== undefined) yield* refreshUsage(true);
# - lines 470-488: makeManagedServerProvider({ ... }) omits checkUsageLimits
Workaround#
Wait >5 minutes after the previous usage poll and refresh again.
tanstack-source added labelsbug
Sign in to join this conversation.