Skip to content

Windows: read Antigravity's quota through agy.exe, open or closed - #507

Merged
vinzdg merged 3 commits into
vinzdg:mainfrom
RawJat:fix/windows-antigravity-agy
Nov 5, 2026
Merged

vinzdg merged 3 commits into
vinzdg:mainfrom
RawJat:fix/windows-antigravity-agy

Conversation

@RawJat

@RawJat RawJat commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Antigravity no longer runs a language_server process on Windows. Antigravity IDE and VS Code's Antigravity extension (google.google-antigravity 1.10.0) both start %USERPROFILE%\.gemini\bin\agy.exe --hub, so Codenotch never found the server, and the ring fell back to counting today's requests ("~0"). With both closed there was no server at all. Refs #410.

Antigravity open: its server is read, as before.

  • The process search also looks for agy.exe. When both are running, the IDE's language_server is used, as in the Mac's AntigravityBridge.discover.
  • Only a process with a token is used. Without one the hub answers 401.
  • agy.exe passes --csrf_token=<t>, so the flag reader accepts that form as well as --csrf_token <t>. Doctor's line now says "local server".

Antigravity closed: that agy.exe reads the quota on its own, through the --print /usage reader Codenotch already has.

  • It runs at launch, on a click and on a hover, at most once every five minutes, and never on the poll's timer. With the ring hidden, nothing runs at launch. Between reads the reading keeps its age.
  • Reads set AGY_CLI_DISABLE_AUTO_UPDATE=true (agy ignores 1). Without it, a due 15-minute update check started agy --bg-updater, which opened a Windows Terminal window. This covers the standalone CLI's reads too.
  • find_agy is unchanged, so a standalone CLI install behaves as before.

The Mac starts a server of its own for this. Here agy.exe --hub answers after 5 s but holds about 207 MB for as long as Codenotch runs. The one-off read takes about 12 s and holds nothing between reads.

Overlap: #495 makes request_hover_refresh test-only and replaces the ConPTY runner, so this conflicts with it in antigravity.rs and agy_cli.rs. If #495 lands first, I'll resolve it here. #450 changes only the non-Windows discover().

Test plan

  • cargo test -p codenotch: 318 passed, including new tests for both flag forms, which server is used, when a read is due, when a hover wakes the poller, and the environment agy gets. Clippy: nothing in the changed files.
  • Doctor with VS Code's extension running: "language_server not running" before, "local server running" on two ports after. Codenotch read all four lanes from it.
  • A temporary build that ignored the running server and polled every 20 s: one agy read at launch with all four lanes, none on three timer ticks, none with the ring hidden.
  • The flash, with an update check due, a release build started by codenotch-hook.exe and a window watcher running. Before, agy logged "Spawned background update process" and a Windows Terminal window opened. After, it logged "Auto-update disabled via environment variable", and no updater or window appeared.
  • With Antigravity IDE running.
  • With Antigravity and VS Code really closed, a hover starting a read.

Antigravity IDE and VS Code's Antigravity extension now start %USERPROFILE%\.gemini\bin\agy.exe --hub instead of a language_server process, and pass its token as --csrf_token=<t>. Discovery looked only for language_server and read only --csrf_token <t>, so it never found the server, and the ring fell back to counting today's requests.

The process search now also takes agy.exe, still preferring the IDE's language_server as the Mac does, and uses only a process that carries a token: without one the hub answers 401. The flag reader accepts both forms.
@RawJat
RawJat requested a review from vinzdg as a code owner October 29, 2026 21:02
The quota was only readable while the IDE or VS Code's extension had a server running. With both closed the ring kept its last figure or fell back to counting requests. The agy.exe they install in ~/.gemini/bin reads the quota on its own, using the sign-in already on the machine.

It takes about 200 MB for twelve seconds, so it runs at launch, on a click and on a hover, at most once every five minutes, and never on the poll's timer. Nothing runs it when the ring is hidden, and with Antigravity open the server is still read instead. The Mac starts a server of its own for this; here that would hold the same 200 MB for as long as Codenotch runs.
When its 15-minute update check is due, agy starts a background updater, agy --bg-updater. Started from Codenotch, which has no console, that updater opens a Windows Terminal window, so the first read of the day flashed one. Running Antigravity, VS Code and Zed together in the morning showed it each day.

AGY_CLI_DISABLE_AUTO_UPDATE=true turns the check off for the read; agy ignores "1". Antigravity and the CLI's own runs still update it. This covers the standalone CLI's reads as well.
@RawJat RawJat changed the title Windows: find Antigravity's server when it runs as agy.exe Windows: read Antigravity's quota through agy.exe, open or closed Nov 2, 2026
@vinzdg
vinzdg merged commit 8cefc8b into vinzdg:main Nov 5, 2026
5 checks passed
@RawJat
RawJat deleted the fix/windows-antigravity-agy branch November 5, 2026 09:50
vinzdg added a commit that referenced this pull request Nov 6, 2026
…panese

- Claude Code sessions named by their title (#510); the lone Claude ring
  named when Claude Desktop uses another account (#511).
- Cost indexer stats transcripts (#501) and acts only on changed readings
  (#514).
- Krea AI (#490), a Xiaomi MiMo preset (#503), Grok multi-account (#515),
  Japanese up to date (#492), deficit rings by soonest expiry (#496).
- Fixes: Claude weekly-only /usage (#527), remote Claude reuse (#522),
  remote Codex behind a proxy (#523), Kiro V2 engine and parsing (#528,
  #517), Kimi monthly quotas (#526), MiniMax China sk-api keys (#529),
  Grok Bot resets (#518), Developer ID team check (#491).
- Windows: the taskbar strip drawn as the notch (#506), Claude accounts as
  rows (#502), Antigravity through agy.exe (#507), a hook auth token (#525).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants