Usage page shows $0 and the desktop app keeps reconnecting while getUsageSummary reads Antigravity history
What happened
The Usage page in the desktop app shows $0, although it showed my data before. While it loads, the app shows " is reconnecting" (the placeholder stands for the machine's hostname). Both started after updating from 0.0.43-nightly.20260924.2223 to the Sep 25/26 nightlies.
Diagnosis
server.getUsageSummary blocks the server's event loop for seconds at a time. Most of that time is spent in the Antigravity usage reader added in #10409 (apps/server/src/usage/antigravityUsageReader.ts, unchanged on main since).
- A CPU profile of one isolated server (same build, fresh base dir, warm usage scan cache, two sequential requests of 17.8 s and 18.0 s) shows:
- The top self-time is
readMetadata, at 10.2 s.parseOpenCodeMessageandreadOpenCodeUsagecome next at about 1.25 s combined. - The three longest uninterrupted main-thread stretches are 3.0 s, 2.2 s and 2.1 s, all in
readMetadata/readDatabase.
- The top self-time is
- The
setImmediateevery 256 rows inreadMetadatadoesn't bound the blocking. Antigravitygen_metadata/stepsrows are large blobs, andnode:sqliteiterate()reads them synchronously. readAntigravityUsagehas no per-file cache, unlike the transcript reader's size/mtime cache. Every request reopens and decodes every.dbunder the Antigravity roots, including files whose mtime is older thansinceMs.- Concurrent
getUsageSummarycalls don't share one in-flight scan. The desktop backend's trace shows three fullscanSummaryruns starting in the same second. - Put together, this becomes a reconnect loop:
- A scan stalls the loop, and trivial
GET /.well-known/t3/environmentrequests take 3.5–11.4 s instead of ~2 ms. - The desktop's
ConnectionDriver.connecttimes out at 15 s, and the banner shows "reconnecting". - The reconnect issues another
getUsageSummary. - The in-flight requests are interrupted, and the page renders $0. The scan cache holds ~60k records, and a direct request returns 302 buckets.
- A scan stalls the loop, and trivial
- Possible directions:
- Cache Antigravity and OpenCode results per file by size/mtime.
- Skip Antigravity
.dbfiles older than the window. - Read SQLite off the main thread; the Claude history reader already uses a worker.
- Share a single in-flight scan across concurrent calls.
Steps to reproduce
- On Linux, have a large Antigravity CLI history in
~/.gemini/antigravity-cli/conversations. Here it's 211.dbfiles totalling ~11 GB, the largest ~306 MB, the newest written 2026-09-10. - Run a nightly containing #10409 (first seen in 0.0.43-nightly.20260925.2269).
- Open the Usage page in the desktop app. It stays loading, the host shows "reconnecting", and the page ends at $0.
- Or, with no UI involved: start
t3 servewith a fresh--base-dir, issue a session witht3 auth session issue, and callserver.getUsageSummary(29-day window) over/wswhile polling/.well-known/t3/environment. Each call takes ~18 s, and the polls stall for over 1 s.
Version
0.0.43-nightly.20260926.2282. The first affected build is 0.0.43-nightly.20260925.2269; the last good one is 0.0.43-nightly.20260924.2223.
Environment
Arch Linux x86_64, kernel 7.1.3-zen, desktop app (Electron 44.4.2), NVMe SSD, 32 GB RAM. The history sources are:
- Antigravity CLI: 211 dbs, ~11 GB
- OpenCode: 161 MB db plus 19,851 message JSON files
- Codex: 21 GB, 6,230 files
- Grok: ~20.9k files
- Claude: 355 MB
Evidence
# desktop backend server.trace.ndjson, UTC
15:24:36Z UsageService.scanSummary 189817ms ws.rpc.server.getUsageSummary 189839ms
15:30:29Z scanSummary 37333 / 39815 / 45903ms (3 concurrent), 3x getUsageSummary Interrupted at 18.9s
15:34:37Z scanSummary 68543 / 70463 / 77668ms (3 concurrent), 1x Interrupted
15:25:32Z-15:27:15Z ConnectionDriver.connect 15000ms status.interrupted=true (x4)
http.server GET /.well-known/t3/environment 3513-11406ms during scans (normally 1-4ms)
RpcClient.server.getUsageSummary: RpcClientError: SocketOpenError: timeout waiting for "open"
# isolated CPU profile, self time (2 requests)
10230 ms readMetadata (antigravityUsageReader)
808 ms parseOpenCodeMessage
445 ms readOpenCodeUsage
longest blocked stretches: 3039ms readMetadata, 2151ms readMetadata, 2140ms readMetadataRelated issues
#7088 is the same class of problem, an unbounded usage scan blocking the server, but it comes from a different source (the ~/projects fallback and the Codex transcript volume). The Antigravity reader didn't exist when it was filed. I found no existing issue about Antigravity usage reads, Usage showing $0 on current nightlies, or reconnects caused by the usage scan.
Fix applied or workaround
Nothing has been changed on the machine. Moving old Antigravity conversations out of ~/.gemini/antigravity-cli/conversations should avoid it, at the cost of that history.
Filed by
Claude Code (claude-opus-5-5), investigating on the user's machine and following .github/triage/PLAYBOOK.md.
Source: pingdotgg/t3code