Skip to content

[Feature]: Show Antigravity CLI sign-in and usage in Accounts #19587

Description

@artile

Problem or use case

As an Orca user signed into Antigravity CLI (agy) on the computer that runs Orca, I want AI Provider Accounts to show that Google session and its usage, so I can see the same 5-hour and weekly windows as agy /usage without treating Antigravity as a Gemini CLI opt-in.

Today Accounts lists Claude, Codex, Gemini (experimental OAuth toggle), OpenCode, MiniMax, and Grok. Antigravity is missing. Status-bar Antigravity usage was a Gemini CLI OAuth mirror and stayed hidden while geminiCliOAuthEnabled is off.

Proposed solution

Detect the Antigravity CLI session on disk (~/.gemini/antigravity-cli), the same way Grok shows an existing CLI login.

  • Show a signed-in Antigravity card in Accounts (email when known).
  • Refresh usage from the Antigravity Cloud Code quota summary (daily-cloudcode-pa retrieveUserQuotaSummary with User-Agent: antigravity).
  • Keep Antigravity independent of the Gemini experimental toggle.
  • If the CLI is signed in but quota cannot be read, keep the account visible and explain that — do not pretend the user is signed out.

Alternatives or additional context

Mirroring Gemini CLI OAuth is the wrong signal: Antigravity stores its own token (antigravity-oauth-token), often with a stale access token that must be refreshed using the OAuth client embedded in the agy binary (not committed; extracted at runtime). Consumer Code Assist retrieveUserQuota without that user-agent returns 403 “valid license of this product.”

Workaround today: read usage only inside the agy TUI.

Activity

  1. slscofield commented on Sep 13, 2026

    @slscofield

    This would be a very helpful feature! The current UI is not useful for tracking Antigravity quota.

  2. added theissue type on Sep 19, 2026
  3. nwparker commented on Sep 19, 2026

    @nwparker
    Contributor

    Review of head 0976023cd0e8393619e1677e8c56bf6781b84a8f: I found credential-save blockers and am not adopting this head unchanged.

    I compiled the candidate's actual antigravity-oauth-sources.ts and ran saveAntigravityCredentials against a temporary directory containing synthetic placeholder credentials only. No real token file, binary OAuth client material, account, or login was modified.

    1. Saving broadens POSIX file permissions. A token file created with mode 0600 became 0644 after save under a normal 0022 umask. writeFile(tmpPath, ..., 'utf-8') creates the replacement with default permissions, then rename replaces the previously private file. The refreshed access/refresh tokens become readable by other local users who can traverse the parent directories.
    2. A stale refresh can overwrite a new login. I read account A's fixture, replaced the on-disk file with account B's fixture, then saved A's refresh result. The result contained A's refresh token again. The production caller awaits network refresh and unconditionally invokes this save function, without checking whether the source account/token changed during that await.
    3. The rewrite drops unrecognized provider fields. An extra fixture metadata field disappeared because the save reconstructs a limited schema rather than preserving the latest provider-owned document.

    ELI5: refreshing the usage card must not make agy's login file less private or undo an account switch the user just made.

    A direct credential-writing implementation needs private temporary-file permissions, platform-appropriate access handling, preservation of provider fields, and a freshness/identity check that does not overwrite a newer login. Prefer avoiding ownership of agy's refresh file for quota: #21654 already reads the supported native /usage command, leaving token refresh with agy. It does not yet solve account identity or multi-account management.

    This machine currently uses API-key authentication and has no token file at the candidate's expected location. Native /usage works but returns no quota groups here; a signed-in Google card and populated quota cannot be validated from that evidence. OAuth identity, account switching, Windows ACL behavior, and SSH/WSL account scope still need live verification. No merge or issue closure.

  4. nwparker commented on Sep 20, 2026

    @nwparker
    Contributor

    Verified status update:

    • #21784 adds native signed-in macOS Antigravity account discovery, identity display, encrypted account storage, and switching. Its account UI also reports the existing agy quota fetch state.
    • Windows/Linux native credential backends and remote account scopes remain unverified because the disposable awin Orca runtime is currently unreachable.
    • I inspected bounded local Antigravity transcripts and cache metadata for #21071. The transcript records did not expose trustworthy per-session token, model, or cost fields. I am not treating character counts, tool results, or quota windows as billable usage.

    ELI5: the account card can now show “who is signed in” on macOS, and the status bar can show agy’s quota windows. The history files do not reliably say how many paid tokens each conversation used, so Usage Analytics must wait for an evidenced accounting source.

  5. 3zatJP commented on Sep 27, 2026

    @3zatJP

    I would also like to see Antigravity treated as a first-class provider in Orca's Accounts and usage surfaces.

    In particular, it would be useful to:

    • detect and show the signed-in Antigravity CLI (agy) account;
    • display Antigravity's actual quota pools and reset times, rather than Gemini CLI usage;
    • expose the same accurate usage information in Accounts and the status bar;
    • keep this working when Gemini CLI is not installed locally.

    This is especially useful when switching between agents in Orca, since users need to know which provider still has capacity before starting a task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions