main
John Lauer antigravity-account: read quota from the hub (RetrieveUserQuotaSummary) without opening Settings 27527af 4d ago

name: antigravity-account description: > Sign Google Antigravity in and out inside Hydrogen, on this machine or a remote one; read its plan and quota (Models & Usage: weekly and five-hour limits) and per-call token usage; and drive the side-bar chat from scripts (find the hub frame, paste a prompt, send, approve permission prompts, unstick queued messages). Read before any sign-in, account switch, quota or cost question, or automation of the Antigravity panel. Trigger words: antigravity sign in, antigravity log in, antigravity login, sign out of antigravity, switch antigravity account, antigravity account, continue with google antigravity, antigravity quota, antigravity usage, weekly limit, five hour limit, antigravity cost, antigravity tokens, RetrieveUserQuotaSummary, antigravity remaining quota, how much of my plan, drive antigravity chat, antigravity panel automation, antigravity queued message, send now.

Antigravity account, quota and panel automation

The antigravity skill installs and opens Antigravity. This one covers who is signed in, what it costs, and how to drive the chat panel from a script. Everything was measured on Hydrogen 1.0.6xx with the Google.google-antigravity extension.

Where things are

thing where
chat panel (the "hub") an iframe whose URL contains extensionView=true: http://<port>.localhost:<proxy>/c/<conversationId>?extensionView=true...
settings the panel's Settings link opens an editor tab whose frame URL contains settings-standalone
account Settings, bottom left: name, email, Sign Out
plan and quota Settings, Models: "Models & Usage": plan, AI-credit overage toggle, Weekly Limit Remaining % and Five Hour Limit Remaining %, per model family (Gemini; Claude and GPT)
conversations ~/.gemini/antigravity/conversations/<conversationId>.db (SQLite)

Reach the frames with Hydrogen's control API: POST /eval-in {target: "extensionView=true", js} for the chat, {target: "settings-standalone"} for settings, {target: "workbench"} for the editor itself. GET /targets lists them.

Sign out and sign in

  1. Sign out: open Settings, click Sign Out. The panel returns to "Welcome to Antigravity" with Continue with Google.
  2. Sign in: click Continue with Google. Antigravity opens Google's consent URL through Hydrogen, which hands it to the machine's browser picker (Hydrogen menu, Browser Picker Manager). The URL's redirect_uri is http://localhost:<port>/auth/callback inside the container.
  3. Same machine, the right account already in that browser: pick the account, confirm Sign in, done; the callback reaches the container over WSL/Lima localhost forwarding.
  4. Remote or shared machine (someone else's desktop): the picker may open that person's own browser profile, which lists their personal accounts and not the team account. Do not add an account to someone else's browser and do not film it. Instead:
    • read the live consent URL from the container: grep -rhoa "https://accounts.google.com/o/oauth2/auth?[^\" ]*localhost%3A[0-9]*%2Fauth%2Fcallback[^\" ]*" ~/.local/share/code-server/logs ~/.gemini | tail -1 (check its code_challenge matches the tab that opened);
    • on YOUR desktop, start a one-shot localhost listener on that port (PowerShell TcpListener on 127.0.0.1:<port> that writes the first request line to a file and answers 200);
    • open the URL in pup, pick the account, confirm Sign in; the redirect lands on your listener;
    • replay the captured path inside the remote container: curl "http://localhost:<port><path>". A 302 to https://antigravity.google/auth-success means signed in; the panel reloads into the last conversation.
    • The callback is one-shot: never probe it with curl before delivering the real code. A new Google account may first demand a phone verification on its first Antigravity sign-in.

AI-driven sign-in (the user asks you to sign Antigravity in for them)

Typical prompt: "sign Antigravity in to Adom's shared account". Adom's shared account (Google AI Ultra, Gemini 4 Argon) has its login on the private page adom/antigravity-team-account (only Adom members can read it). Never print that page: write it to a file in your scratchpad (adom-wiki repo show adom/antigravity-team-account README.md > "$S/acct.md"), pull the password out with a regex on its | **Password** | ... | table row straight into the pup_type call, and delete the file when done. Never repeat the password in chat, a tool output, or any public file.

  1. adom-antigravity status; install what is missing (adom-wiki pkg install adom/antigravity, then adom-antigravity install-extension and one editor reload) and adom-antigravity open.
  2. If the panel shows a signed-in conversation for another account, Sign Out first (Settings).
  3. Click Continue with Google in the panel (/eval-in on extensionView=true). Close whatever browser tab the picker opened only if you opened it.
  4. Read the live consent URL from the container logs (grep above) and open it in pup on the same desktop (pup_open_window {url}). In Google's chooser click Use another account (or the account if pup already knows it), type the email, Next, type the password with pup_type, Next, then confirm Sign in on the "Make sure that you downloaded this app from Google" page.
  5. On the user's own machine the redirect to http://localhost:<port>/auth/callback reaches the container directly (WSL/Lima localhost forwarding) and the panel signs in by itself. If pup shows "localhost refused to connect", relay the callback as in the remote-machine recipe above.
  6. If Google asks to verify it's you, tell the user to get the phone approval (for the shared account, John approves it) and wait on the page.
  7. First-login wizard (an account or machine new to Antigravity): a Security Notice & Data Use screen with an optional data-sharing checkbox and Get started (click it; leave the checkbox as the user wants), then a Meet Gemini 4 Argon card with Dismiss. Both are plain buttons in the extensionView=true frame.
  8. Pick the model (Gemini 4 Argon) in the chat box's model menu, and offer the Antigravity usage widget: POST $ADOM_HD_CONTROL_URL/widgets/open {"id":"antigravity-usage"}.
  9. Close the pup window you opened.

Hydrogen's own entry point is the VS Code AI menu (+ in the toolbar, title starting "New AI thread") → Manage AIs (sign in, sign out, add one) → Sign in on the Antigravity row (div.line in the shell frame). It runs /agents/open-panel and the dialog closes itself after a 3-second countdown.

Showing the wizard again (demos, recordings): it is remembered in ~/.gemini/antigravity/antigravity_state.pbtxt (post_onboarding, seen_nuxs, agent_onboarding_completed). Back the file up, sign out (POST /agents/logout {"key":"antigravity"}), pkill -x agy, delete those three entries, then reload the editor before opening the panel: a webview left on a killed hub shows "Lost connection to the language server" and never signs in.

Why no editor tab: the extension's tab mode expects the tunnel Google's own Antigravity IDE (a VS Code fork) provides; under Hydrogen's code-server it never connects. Use the side-bar panel, which reaches the local hub through Hydrogen's port proxy.

Quota and cost

Antigravity on a Google AI plan (Pro, Ultra) is not billed per token: usage draws down plan quota, shown as Weekly Limit Remaining and Five Hour Limit Remaining percentages in Settings, Models. Read the same numbers without opening Settings (no editor tab, nothing on screen): ask the running hub agy --hub for RetrieveUserQuotaSummary. Its port and CSRF token are on its command line (ps -eo args); POST http://127.0.0.1:<port>/exa.language_server_pb.LanguageServerService/RetrieveUserQuotaSummary with header x-codeium-csrf-token: <token> and body {} returns response.groups[].buckets[] with window (weekly, 5h), remainingFraction and resetTime, one group for Gemini and one for the Claude and GPT models. GetUserStatus on the same service gives the signed-in email and tier; GetLoadCodeAssist the plan name. On another machine run it through Adom Bridge wsl_exec. The ready-made script for every AI is in the hydrogen-ai-agents skill, section Quota. There is no history: the page shows the value now, nothing about past runs. To know what a job costs, read both percentages right before and right after it (and every few hours on long jobs, since the five-hour window refills) and report the drop. "Included in the plan" is not a cost answer.

Per-call token usage IS recorded locally. Each conversation DB has a gen_metadata table, one protobuf row per model call. Field 1.4 is the usage record; as decoded on 2026-10-16 (undocumented, consistent across thousands of calls): 1.4.1 = model id, 1.4.2 = fresh input tokens, 1.4.3 = output tokens, 1.4.5 = cached input tokens. Field 1.19 is the model name (for example gemini-4-argon). Sum them per conversation for a job's token count.

Drive the chat from a script

  • Send a prompt: the input is a Lexical editor. Focus the last [contenteditable=true], dispatch a paste ClipboardEvent with a DataTransfer holding the text, then a keydown Enter. Synthetic paste leaves the send button disabled, so Enter is the way.
  • Queued messages: a message sent while the agent is working goes to "Queued Messages" and normally sends when the turn ends. After an editor reload or a Hydrogen restart it can stay stuck there forever: if the agent is idle and the queue is not empty, click the Send Now button.
  • Permission prompts: "Waiting for user input" with options as <p> inside <label>s. Click the label of "Yes, and always allow in this project", then the button whose text starts with Submit (it carries a "↵" hint, so match the prefix). Or set Settings, General, Permission Preset to Auto.
  • The side bar loses Antigravity when the agent opens or reveals a file (it switches to Explorer); click the activity-bar item labelled Antigravity to bring it back. Its width resets to about 170 px after reloads; drag the .monaco-sash.vertical at the side bar's right edge with mouse events to widen it.
  • Hydrogen auto-updates restart the window, kill the agent's turn, and sometimes leave the hub down until an editor reload (location.reload() in the workbench frame, or adom-antigravity open). After it, reopen the conversation from the panel's list and tell the agent to continue.
  • POST /eval-in returns after about 5 s; for anything longer, start it without awaiting (requestAnimationFrame or setTimeout) and poll a flag.
  • Old messages are virtualised: scroll the conversation's scroll container up until the message you need is in the DOM.