Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Antigravity health check always fails on Windows — 15s probe timeout vs ~45s cold start of official agy_acp_server #9432

Closedtharusha-nayanajith(GitHub profile, opens in a new tab) opened this issue 4 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. T3 Code Nightly 0.0.39-nightly.20260903.1268 on Windows 11 x64.
  2. Configure the Antigravity provider with Binary path pointing at the official agy_acp_server.exe (agy_acp_server_20260818_01_RC01, win32-x64 release from dl.google.com/agy-extensions, the same build t3 auto-installs). Leaving it on Automatic leads to the same result.
  3. Wait for the provider health check.

Expected behavior

The Antigravity provider becomes ready — the binary answers ACP initialize correctly (verified manually over stdio: full capabilities + auth methods).

Actual behavior

Permanently stuck at: "Antigravity did not respond to its local health check within 15 seconds."

Impact

Blocks work completely (Antigravity provider unusable)

Version or commit

0.0.39-nightly.20260903.1268

Environment

Windows 11 (10.0.26200) x64, desktop nightly. Official agy_acp_server.exe, 297200088 bytes (matches the win32-x64 asset t3 itself pins: archive sha256 35c7dd169c2794172ce02e9444a6db4a8ed4bb11398be07976cac2ee494f44e6).

Logs

Timed the binary directly over stdio (initialize request piped to stdin): first response consistently takes ~40-47s, cold and warm alike — the 297 MB self-contained Python bundle pays full interpreter + dependency init on every launch. So the probe below can never succeed on this machine:

  • src/provider/Layers/AntigravityProvider.ts — checkAntigravityProvider wraps options.probe in a hardcoded timeoutOption("15 seconds"), and the probe is ACP initialize only ("Health uses initialize only").
  • For comparison, the managed install path validates the same binary with VALIDATION_TIMEOUT = "90 seconds" (src/provider/AntigravityInstallation.ts), which would pass — but the 15s health check still fails right after.

Disk space and Defender exclusions were already ruled out as the fix on my machine (22 GB free, same ~47s timing).

Suggested fix

Raise the Antigravity probe timeout (at least past the official binary's real cold-start cost), or keep one warm long-lived ACP process instead of spawn-per-check.

  1. Update from my machine: a Defender exclusion shaved cold start from ~47s to ~43s only — nowhere near the 15s budget, so this isn't AV-related. Key extra finding: a second initialize on an already-running server answers in ~2ms (double-initialize is accepted), i.e. the entire cost is one-time process boot (embedded-Python init), not request handling. I worked around it locally with a tiny stdio proxy that keeps one pre-warmed standby: initialize then answers in ~100ms and session/new +53ms, fully transparent. Still, the hardcoded 15s probe can't ever pass a cold official binary on Windows — raising it (or warming once) on the t3 side would fix this for everyone.

  2. Workaround validated on my machine for anyone hitting this: a local stdio proxy that keeps one pre-warmed server process (second initialize on a warm process answers in ~2ms, so one 45s boot amortizes). Measured through the proxy: initialize in 100-250ms, session/new +50ms. It converges after ~3 probe cycles from cold (each killed probe's partially-booted process is inherited by the next instead of restarted). Happy to share the ~300-line script if useful — but the real fix is still raising that 15s probe timeout (or warming once) on the t3 side.

  3. We spent today debugging the Google sign-in hang (#9405) on Windows 11 against nightly 20260903.1272 and the 40–47 s cold boot documented here interacts with it in two ways worth flagging:

    1. Users cancel during the silent boot. "Starting Google sign-in" gives no feedback for 35–50 s, and we observed real attempts being cancelled at 3.9 s and 37 s — well before initialize finished. The 45 s health-check allowance from #9425 is already borderline against the 40–47 s reported here; a pre-warmed process (your proxy approach) would remove both the timeout risk and this UX trap.

    2. For the record, on Windows the login needed two more fixes beyond #9425 as merged in 1272:

    • The no-browser helper must run node from PATH, not the packaged Electron executable (HostProcessExecutablePath). When the packaged Python spawns the BROWSER command, the child does not honor ELECTRON_RUN_AS_NODE, so the Electron-exe helper never emits its __T3_ANTIGRAVITY_AUTH_URL__ marker. The preflight in prepareAntigravityProfile passes either way (it spawns the helper directly with ELECTRON_RUN_AS_NODE=1 in env), which makes this failure mode invisible to the profile check.
    • The merged code discards all ACP stderr (onStderr: drainAntigravityStderr) and relies on the Open the following link to authenticate the ACP server: stdout line — but the agent never prints that line when webbrowser.open "succeeds" through the helper. With the helper fixed but stderr discarded, authenticate hangs forever at "Starting Google sign-in" until the 5-minute timeout. We restored the stderr marker channel locally and the URL arrives ~140 ms after authenticate (verified by driving the real agy_acp_server.exe through initialize → authenticate(oauth-personal) with the exact env the server builds).

    One more Windows-only trap: after consent, loadCodeAssist hung with WinError 10060 on machines where IPv6 to Google is unreachable (AAAA-first resolution; curl -6 times out, curl -4 is fine). Preferring IPv4 via netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 46 4 (reversible, default 35) fixed that leg.

    End state: sign-in completes, acp_token.json lands in the profile, models load. Happy to turn the two server-side Windows fixes into a PR if that's useful.

  4. Follow-up data point on the Windows cold boot, in case it helps others hitting the 40–47 s range: a large share of it was real-time antivirus scanning of the PyInstaller onefile extraction, not the extraction itself.

    agy_acp_server.exe is a ~297 MB onefile bundle that writes ~726 MB of extracted runtime into %TEMP%\_MEIxxxxx on every spawn, and Windows Defender scans each written file. Excluding the two processes brings the measured cold start from 27–34 s down to 12.3–12.6 s (−60 %, two consecutive runs, Windows 11, driving the real exe through initialize → authenticate):

    Add-MpPreference -ExclusionProcess 'agy_acp_server.exe'
    Add-MpPreference -ExclusionProcess 'localharness_external.exe'
    # rollback: Remove-MpPreference -ExclusionProcess 'agy_acp_server.exe'; Remove-MpPreference -ExclusionProcess 'localharness_external.exe'

    The remaining ~12 s is pure decompression cost, so the floor without process reuse or a packaging change on Google's side stays around there. Between this, the 45 s health-check allowance from #9425, and eventually a pre-warmed process, the Windows experience gets considerably less painful.

Sign in to join this conversation.