Skip to content

fix(engine): read Antigravity quota from the configured agy and explain empty model lists - #4057

Merged
LHagfoss merged 1 commit into
mainfrom
fix/engine-antigravity-quota-models
Nov 19, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/engine-antigravity-quota-models

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

On a Mac, Settings › Usage showed "Antigravity CLI did not answer within 10 seconds", then "Run agy to check its sign-in", while the same agy --print /usage worked in a terminal. The harness check also said "Ready · 1.5.12 · no model list", while the VPS lists 4 models. RustCode discarded agy's output on both paths, so the cause could not be seen.

  • Quota read (provider_auth/antigravity_usage.rs): runs the Executable and Environment set in Settings › Harnesses › Antigravity instead of whichever agy comes first on PATH. It keeps stdout and stderr, and a failed read now ends with what agy said (its JSON error, or its last stderr lines, capped at 300 characters); failures are also written to debug.log. A timeout now says the CLI may be waiting for a sign-in and points to Sign in.
  • Meter under the message box (acp/usage.rs harness_limits): an Antigravity thread shows the quota group of its model: Gemini, or Claude and GPT. With no model it uses Gemini, Antigravity's default. _rustcode/usage/limits is already relayed, so a paired Mac sees the quota of the machine the thread runs on. The app keeps those numbers on the thread (state/planUsage.ts), so a thread in the other group never reads them.
  • Model list (harness/session.rs, acp_child.rs): new KnownHarness::lists_models flag, set only for Antigravity. When its listing comes back empty, the Check fails with what the new session offered and agy's last stderr lines, and the models listed before stay cached. Other harnesses still show "Ready · no model list".

Changelog

Show Antigravity's quota in the meter under the message box, and say why an Antigravity quota read or model list fails.

Testing

  • On the VPS (agy 1.5.12), the 1.44 engine's _rustcode/harnesses/models with refresh lists 4 models, and a manual agy acp session/new returns models and configOptions. So the empty list only happens on the Mac, and this change is what will show its cause there.
  • Unit tests: group selection for the meter (antigravity_meter_reads_the_quota_group_of_the_threads_model) and error-text extraction (a_failed_read_carries_what_the_cli_said).
  • cargo check --workspace --tests, cargo fmt --all -- --check, and bun run check in apps/desktop all pass.

@github-actions github-actions Bot added the fix A bug fix label Nov 19, 2026
@LHagfoss
LHagfoss merged commit 54289c3 into main Nov 19, 2026
10 checks passed
@LHagfoss
LHagfoss deleted the fix/engine-antigravity-quota-models branch November 19, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants