Skip to content

fix(server): Antigravity sign-in no longer blames the network when the runtime never starts - #29057

Open
juliusmarminge wants to merge 3 commits into
mainfrom
fix/issue-29039
Open

juliusmarminge wants to merge 3 commits into
mainfrom
fix/issue-29039

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

Problem

When the Antigravity runtime hangs at startup (the Intel Mac agy_acp_server.par stuck in libffi, as in the report), Settings → Providers → Antigravity → Sign in tells the user to check the network. After 30 seconds it says "Antigravity has not reached Google after 30 seconds. Check this machine's network connection. Broken IPv6 is a common cause." At 5 minutes it fails with "Antigravity could not reach Google…". The process never answered ACP initialize, so it never got as far as Google.

Reproduced on main (91f66f8) with a fresh dev server. I set the Antigravity binary path to a stand-in that starts and never writes to stdout, then clicked Sign in. The Account row showed the IPv6 hint at 33 s and the "could not reach Google" failure at 300.9 s.

Change

runSignIn in apps/server/src/provider/AntigravityAuth.ts now awaits runtime.initialize() before runtime.start() and records on the flow that the agent answered. AcpSessionRuntime caches initialize, so start() reuses that result and no extra request is sent.

  • Agent never answered initialize: the 30 s hint reads "Antigravity has not responded after 30 seconds. Its runtime may be stuck starting on this machine." The 5-minute failure reads "Antigravity did not respond. Its runtime may not run on this machine."
  • Agent answered initialize: the existing network hint and failure are unchanged.

The test harness's initialize is now cached, like the real runtime's.

Scope and approval

Fixes #29039

Triaged via the automated issue flow.

Verification

  • vp test run apps/server/src/provider/AntigravityAuth.test.ts: 18/18 pass. The new test "does not blame the network when the agent never answers initialize" fails on main with expected 'Antigravity has not reached Google af…' not to match /reach(ed)? Google|network|ipv6/i. The existing "tells the user when the agent cannot reach Google" passes unchanged; in that test the agent answers initialize and then stalls.
  • vp test run apps/server/src/provider/Drivers/AntigravityDriver.test.ts: 4/4 pass, still one initialize per process.
  • vp run check:changed: passes.
  • Real app, web dev server, fresh database on each side. Two stand-in runtimes: hung (exec sleep, never writes stdout) and answering (replies to initialize, never answers authenticate). Account row text read from the page:
Fixture Before (91f66f8) After (ef554ff)
Hung, 30 s "Antigravity has not reached Google after 30 seconds. Check this machine's network connection. Broken IPv6 is a common cause." (t=33 s) "Antigravity has not responded after 30 seconds. Its runtime may be stuck starting on this machine." (t=53 s)
Hung, 300 s "Antigravity could not reach Google. Check this machine's network connection, then start sign-in again." (t=300.9 s) "Antigravity did not respond. Its runtime may not run on this machine." (t=323 s)
Answering, 30 s unchanged branch "Antigravity has not reached Google after 30 seconds. Check this machine's network connection. Broken IPv6 is a common cause." (t=34.7 s)
Answering, 300 s unchanged branch "Antigravity could not reach Google. Check this machine's network connection, then start sign-in again." (t=323 s)

Not checked:

  • No screenshots are attached. The table above is the page text at each point.
  • Not run against the real Antigravity runtime or on an Intel Mac. The changed code is platform-independent, and the stand-ins reproduce the reported hang.

Created with Claude Opus 5.5 in Claude Code (issue lead, red-test and implement steps); reviewed by GPT-6.1 Sol (Codex) and Claude Opus 5.5.

🤖 Generated with Claude Code

juliusmarminge and others added 3 commits November 2, 2026 04:09
…k for a hung runtime

These tests reproduce #29039: when the Antigravity process never answers
ACP initialize, sign-in still says it has not reached Google and later
that it could not reach Google, blaming the network.

The auth test harness now runs its own initialize inside start(), as the
real AcpSessionRuntime does, so beforeInitialize can hang the process
before authenticate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e agent never starts

Sign-in said Antigravity had not reached Google, and later could not reach
it, whenever the flow was still starting. On an Intel Mac the runtime hangs
before it answers ACP initialize, so T3 blamed the network and IPv6 for a
local process hang.

runSignIn now awaits initialize before start and records it on the flow.
Until the agent answers, the 30 second hint and the timeout say the runtime
may be stuck on this machine; afterwards the network messages are unchanged.
The real runtime caches initialize, and the test harness now does too.

Fixes #29039

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 2, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 06cc12d

Macroscope's review found this PR approvable — Antigravity sign-in now distinguishes a runtime startup hang from a later network stall. Existing authentication behavior and timeouts remain unchanged, with no additional initialization handshake.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.6 KiB 21.6 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Baseline: d890e5c · PR result: 06cc12d · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge juliusmarminge added the bugfix Fix PR opened by an issue lead; enters the PR loop label Nov 2, 2026
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between d890e5c and 06cc12d.

Files selected for processing: 2
  • apps/server/src/provider/AntigravityAuth.test.ts
  • apps/server/src/provider/AntigravityAuth.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

Antigravity sign-in now tracks whether runtime initialization completed. Its 30-second status and final timeout message distinguish a startup hang from a Google connectivity failure. Tests cover an unresponsive runtime and initialization before authentication.

Changes: Antigravity sign-in startup

Layer / File(s) Summary
Track runtime initialization
apps/server/src/provider/AntigravityAuth.ts, apps/server/src/provider/AntigravityAuth.test.ts
The sign-in flow records successful runtime initialization. The test harness caches initialization and awaits it before authentication.
Select startup and connectivity messages
apps/server/src/provider/AntigravityAuth.ts, apps/server/src/provider/AntigravityAuth.test.ts
The 30-second status and final timeout message depend on whether initialization completed. Tests check the unresponsive-runtime message and the process event order.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: t3dotgg

Merge Risk: Minimal · up to 06cc1

The timeout distinguishes an unresponsive runtime from a connectivity failure. No material merge-blocking risk remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: Antigravity sign-in no longer reports a network problem when the runtime does not start.
Description check Passed The description includes the problem, reproduction details, implementation change, scope and issue reference, focused verification results, observed behavior, and known testing limitations. It follows…
Linked Issues check Passed Issue #29039 requires a non-network diagnostic when the Antigravity child process does not answer during startup. runSignIn now awaits runtime.initialize() before runtime.start(). The 30-second …
Out of Scope Changes check Passed The changed production code updates Antigravity sign-in timeout classification. The test changes support this behavior and preserve the single-initialize flow. These changes directly support issue #29…
Full details: Description check

Explanation

The description includes the problem, reproduction details, implementation change, scope and issue reference, focused verification results, observed behavior, and known testing limitations. It follows the required sections and is sufficiently complete.

Full details: Linked Issues check

Explanation

Issue #29039 requires a non-network diagnostic when the Antigravity child process does not answer during startup. runSignIn now awaits runtime.initialize() before runtime.start(). The 30-second and five-minute messages use the unresponsive-runtime text until initialization completes. The existing Google-network messages remain for initialized runtimes. AntigravityAuth.test.ts adds coverage for the stalled-initialize case and verifies both timeout messages. The test harness caches initialization and start() reuses it.

Full details: Out of Scope Changes check

Explanation

The changed production code updates Antigravity sign-in timeout classification. The test changes support this behavior and preserve the single-initialize flow. These changes directly support issue #29039. No unrelated production behavior is shown in the reviewed changes.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Misleading "Broken IPv6" network timeout error shown when Antigravity runtime hangs at startup

1 participant