fix(server): Antigravity sign-in no longer blames the network while the runtime starts#30079
Problem
On Windows, every Antigravity Google sign-in shows "Antigravity has not reached Google after 30 seconds. Check this machine's network connection. Broken IPv6 is a common cause." The network is fine. The runtime simply has not finished starting yet.
AntigravityAuth.runSignIn started the 30-second hint timer before it spawned the ACP runtime. agy_acp_server.exe is a one-file bundle that unpacks itself (about 1.2 GB into TEMP) on every launch. On Windows that takes close to a minute before the runtime answers initialize, so the hint always fires first. The comment above NO_RESPONSE_HINT_MS assumes a healthy agent shows the link "within seconds", which only holds after initialize.
Reproduction: Windows 11, T3 Code desktop 0.1.6, Antigravity runtime 1.1.1 (the pinned release). Press Sign in under Antigravity in Settings and wait. The IPv6 hint appears at 30 s. The Google link only arrives after the runtime finishes starting (about 60 s after the click).
Change
runSignIn now creates the runtime, awaits runtime.initialize(), and only then forks the 30-second hint. AcpSessionRuntime memoizes initialize, and start() reuses it, so no extra ACP request is sent. The hint now measures the time spent waiting on Google, which is what its message describes. The 5-minute overall timeout is unchanged.
Tests: the fake runtime in AntigravityAuth.test.ts now memoizes initialize and has start() reuse it, like the real runtime. That makes one event-order assertion include "initialize". A new test holds initialize open for 60 s and checks that the hint stays hidden. It then checks that the hint still appears exactly 30 s after initialize returns.
Scope and approval
This is a small, focused fix for an obvious bug, so I'm submitting it without a prior issue. A user-facing diagnostic blames the user's network for a delay that comes from the runtime's own startup. The fix moves where an existing timer starts, in one function, and changes no copy, settings, UI, or product behavior.
Verification
- Established the problem from T3's server trace (
server.trace.ndjson) during a real sign-in on the environment above:AntigravityAuth.runSignInstarted at 17:12:33.185, and the ACPinitializespan ran from 17:12:34.455 to 17:13:30, i.e. 56 s before the runtime answered. A second manual launch of the sameagy_acp_server.exewith T3's environment (GEMINI_HOME,TEMP,AGY_ACP_FORCE_FILE_STORAGE=1) gave: spawned 17:14:34, first stderr 17:15:26,initializeanswered 17:15:28.authenticateprinted the Google link in the same second, so the startup delay came before any network request. - Regression test:
vp test run apps/server/src/provider/AntigravityAuth.test.ts- Without the
AntigravityAuth.tschange: the new test fails withAssertionError: expected true to be falseat the 60-second check (the hint was already shown whileinitializewas still pending). 17 others pass. - With the change: 18/18 pass.
- Without the
tsc --noEmitforapps/server,vp lintandvp fmt --checkon the changed files are clean. The pre-commit hook (fmt,lint,knip:check) passed.- Not checked: I did not build a packaged desktop app to watch the Settings message end to end. I did not measure runtime startup on macOS or Linux, where unpacking is likely faster; the fix does not depend on the platform.
Done with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
Checks
Added 1 commit
- fix(server): Antigravity sign-in no longer blames the network while the runtime startsaba4bfe
Approvability
Verdict: Approved at aba4bfe
Macroscope's review found this PR approvable — The network warning now waits until Antigravity's runtime finishes initializing, avoiding misleading messages during slow startup. The existing authentication flow and overall timeout remain unchanged.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
The Antigravity sign-in flow now initializes the runtime before starting the no-response hint timer and authentication. Tests cover the initialization handshake and verify the hint timing.
Changes: Antigravity sign-in timing
Layer / File(s) Summary Initialize runtime before hint timer
apps/server/src/provider/AntigravityAuth.ts,apps/server/src/provider/AntigravityAuth.test.tsrunSignIninitializes the runtime before scheduling the no-response hint and callingstart(). The test harness reuses the initialization handshake. Tests verify that the hint appears 30 seconds after authentication starts, not during a delayed initialization. The timing comment notes that runtime unpacking can take about a minute on Windows.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
pingdotgg/t3code#29379— The change starts the hint timer after initialization, addressing the report that it appears during a 27-to-43-second initialization. The reported session hang is not addressed.pingdotgg/t3code#29039— The change delays the hint until initialization completes, changing its behavior during a startup hang.
Possibly related PRs
- pingdotgg/t3code#29411 — Both changes modify the Antigravity no-response hint and add tests for its timing or suppression.
Suggested labels:
bugfixSuggested reviewers:
t3dotgg,juliusmarminge
Merge Risk: External image Minimal · up to aba4b
The hint now waits for runtime initialization, while the overall sign-in timeout remains in place. No merge-blocking issue was identified.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title names the fix and its scope: Antigravity sign-in no longer shows the network hint while the runtime starts. The changeset moves the 30-second no-response hint so it starts after runtime.init… Description check Passed The description follows the template's sections: Problem, Change, Scope and approval, and Verification. The Problem section states the expected behavior, the observed behavior, and reproduction steps … Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Full details: Title check
Explanation
The title names the fix and its scope: Antigravity sign-in no longer shows the network hint while the runtime starts. The changeset moves the 30-second no-response hint so it starts after runtime.initialize(), which matches the title. The title follows the conventional commit form and is specific.
Full details: Description check
Explanation
The description follows the template's sections: Problem, Change, Scope and approval, and Verification. The Problem section states the expected behavior, the observed behavior, and reproduction steps with environment. The Change section explains the fix and why it is scoped to one function. The Scope section gives a reason for submitting without a prior issue, as the template allows for small, obvious bug fixes. The Verification section lists focused tests, a regression check with and without the change, lint and type checks, and what was not checked. The description ends with a model and harness attribution, as the template requests. One point is open: the template asks to link a triaged issue or maintainer approval for direction and scope, or to explain why the fix qualifies without one. The author gives that explanation, so the section is complete on its own terms.
Finishing Touches
Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: cefb544
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9548ae23-5191-43b4-a365-667b5adf0bf9
External image Commits
Reviewing files that changed from the base of the PR and between cefb544af3c98224874419198c0359b652ca3c94 and aba4bfe7902c844bd3e3954be992b1c9885fd17c.
External image Files selected for processing: 2
apps/server/src/provider/AntigravityAuth.test.tsapps/server/src/provider/AntigravityAuth.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: cefb544
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9548ae23-5191-43b4-a365-667b5adf0bf9
External image Commits
Reviewing files that changed from the base of the PR and between cefb544af3c98224874419198c0359b652ca3c94 and aba4bfe7902c844bd3e3954be992b1c9885fd17c.
External image Files selected for processing: 2
apps/server/src/provider/AntigravityAuth.test.tsapps/server/src/provider/AntigravityAuth.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Note
Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
verified as-is at aba4bfe7902c844bd3e3954be992b1c9885fd17c, against github/main at cefb544af3c98224874419198c0359b652ca3c94.
ran the actual web app with repository playwright and /usr/bin/google-chrome. installed the official antigravity 1.4.5 runtime through settings. used matching app-created state, with only one background dev server running at a time.
linux starts quickly, so the slow-start comparison used a disclosed shell wrapper that waits 45 seconds, then executes the official runtime and forwards every argument. no ACP responses were mocked. on main, the misleading network hint was visible at the 31-second sample. on this head, it never appeared during startup. both reached the real google sign-in controls at approximately 47 seconds. server spans show exactly one successful initialize per sign-in, followed by authenticate.
cancel during initialization, cancel after the google link, and retry to a fresh google link all worked. real codex gpt-6.1-sol turns completed through the web composer on both revisions, using a project pointing to a real git repository.
blacksmith vp run check:changed cefb544af3c98224874419198c0359b652ca3c94 passed formatting, lint, knip, graphql, affected typechecks and 19 tests. the focused antigravity auth suite passed all 18 tests. no source changes or pushes were needed.
main at 35 seconds: misleading network hint during controlled startup delay
pr at 35 seconds: starting google sign-in without a network warning
recording of main followed by pr with elapsed seconds visible at 4x playback
command and runtime transcript
Not verified
windows extraction timing and packaged desktop/native mobile clients were not exercised on this linux VM. completed google account authentication was not exercised because no google account was supplied. a real post-initialize google network stall and the full five-minute timeout were not exercised; the existing auth tests cover their timing behavior.