Repository navigation
[Feature]: Add Antigravity (agy) session support to the AI Vault Session Scanner / Usage Analytics dashboard #21071
Description
Description
The "Usage Analytics" panel (Stats & Usage / AI Vault dashboard) only lists Overview, Claude, Codex, OpenCode, and Grok in its provider dropdown. Antigravity (the agy CLI) never appears as an option, even after running real Antigravity sessions through Orca — there is no way to see token counts, cost, or session history for Antigravity in this view.
This is distinct from the status-bar quota/rate-limit widget, which does track Antigravity today (after fixes in #9122, #14227, #18167, #19209, #20797). This issue is specifically about the Usage Analytics / AI Vault Session Scanner, a separate subsystem that reads local session/transcript files to compute token & cost analytics.
Root Cause Analysis
The AI Vault Session Scanner currently ships parsers for a fixed set of agent products only:
- Claude — JSONL logs with conversation turns and token counts
- Codex — multi-lane JSONL with dedup on import
- OpenCode — SQLite databases tracking token usage metrics
- Kimi, Grok, Devin — custom parsers for their own formats
Gemini/Antigravity session/transcript files are not parsed by the Session Scanner at all, so Antigravity can never surface in the Usage Analytics dropdown or aggregate stats (total tokens, est. cost, daily intensity, token mix, providers list), regardless of how many Antigravity sessions have actually run.
Steps to Reproduce
- Run one or more coding sessions with Antigravity (
agy) through Orca. - Open the "Usage Analytics" panel (Stats & Usage).
- Open the provider dropdown (currently: Overview / Claude / Codex / OpenCode / Grok).
- Antigravity is absent — no data, no entry, no way to enable it.
Proposed Solution
- Add a Session Scanner parser for Antigravity's session/transcript format (mirroring how the Codex or OpenCode parsers were implemented), so Antigravity sessions are discovered, parsed, and persisted like the other supported providers (e.g. into an
orca-antigravity-usage.jsonstore). - Surface Antigravity as a provider entry in the Usage Analytics dropdown and provider cards, consistent with how Claude/Codex/OpenCode/Grok are shown (tokens, sessions, turns, est. cost).
- If native token/cost accounting isn't available from Antigravity's own session files, at minimum expose whatever the
agy --print /usage --output-format jsonfetcher (added in fix(rate-limits): read native Antigravity usage #20797 for the status bar) already returns, so the two subsystems stay consistent.
Environment
- Orca app version: 1.4.204
- OS: macOS (darwin)
- Agent hooks:
antigravityhooks are installed and enabled (orca agent hooks statusreportsinstalled/managedHooksPresent: true), so this is not a hook-installation problem — it's a missing parser in the analytics subsystem.
Related
- [Bug]: Antigravity usage is a copy of the Gemini quota — wrong pools, and refresh breaks entirely without a local Gemini CLI install #9122 (Antigravity rate-limit was a copy of Gemini's quota)
- [Bug] Antigravity Usage Status Bar indicates Refresh Failed (Missing Usage Fetcher) #14227 (Antigravity status bar "Refresh failed" — missing usage fetcher)
- feat(rate-limits & i18n): support Antigravity live quota, provider branding, and complete UI localization #18167 (Antigravity live quota + branding)
- fix(usage): read Antigravity quota from its own credential, including SSH hosts #19209 (read Antigravity quota from its own credential)
- fix(rate-limits): read native Antigravity usage #20797 (native Antigravity usage fetcher via
agy --print /usage)
These all fixed the status-bar rate-limit side of Antigravity usage. This issue tracks the still-missing Usage Analytics / AI Vault side.
Activity
AmethystLiang commentedon Sep 18, 2026
Will prioritize this. ETA for landing PRs & rolling out is early next week!
nwparker commentedon Sep 19, 2026
I reviewed head
20630344f78aa9e0b116e7c03c8a4615b7bee74aand ran its actual parser against bounded samples of local Antigravity transcripts. I am not adopting this candidate as Antigravity usage accounting yet.P1: tool-result records become invented billable model events. In
parseGeminiUsageRecord,source === 'MODEL'enables the character-count fallback for every model-sourced record, includingRUN_COMMAND,VIEW_FILE, and other tool results. The following record has neither generated text nor usage metadata:{"source":"MODEL","type":"RUN_COMMAND","status":"DONE","created_at":"2026-09-19T10:00:00Z","exit_code":0}The candidate returns 50 input tokens, 5 output tokens, model
gemini-2.5-pro, and $0.0001125. An inferred-pricing flag cannot make these token counts observed consumption. Actual bounded samples produced:The five samples contain completed planner/tool activity, not only this machine's recent authentication failures. None of their inspected records exposes top-level token, model, or cost fields. I inspected schema/counts and kept all transcript text, account identifiers, and paths private.
P1: unknown Antigravity models are billed as Gemini 2.5 Pro. Both record/document parsers choose this model when absent. Antigravity is a separate product and supports multiple model families; a transcript lacking a model does not establish Gemini usage or its billing rate. Combining both products under
geminialso loses provider attribution requested in #21071.Suggested takeover boundary: reuse the established fixed-path Antigravity transcript/history scanner for session/message activity; keep unavailable token/cost/model values explicitly unavailable. Add measured usage only from an evidenced accounting source, with provider identity preserved. If character estimates are desired, expose them separately as text-size estimates and exclude them from measured usage/billing totals. The native
/usagecommand supplies quota windows, not per-session token consumption, so it cannot fill this accounting gap.Relevant code: record parser, document parser. This is executable candidate evidence; no production accounting change or successful new agy generation is claimed.
nwparker commentedon Sep 20, 2026
ELI5: a transcript can tell us that agy did work, but it cannot tell us how many paid tokens that work used unless agy records the usage. Counting characters and pretending the result was Gemini billing would be an invented bill. The safe next step is session/activity discovery with token, cost, and model left unavailable until agy exposes an evidenced accounting source.