Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): forward Google sign-in URLs from browser helper #9425

MergedWellyngtonF(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/9425/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

On Windows, Antigravity Google sign-in could stay on "Starting Google sign-in" without ever showing the browser link. The provider also appeared unavailable when its packaged runtime took longer than the 15-second health-check limit to initialize.

Cause: T3's no-browser helper writes its controlled OAuth marker to stderr on Windows, but the ACP runtime discarded all Antigravity stderr. The packaged runtime took 17-27 seconds to initialize in repeated Windows probes.

Fix

  • Read only T3's exact browser-helper marker from stderr, decode and validate the Google authorization URL, and forward it to the existing auth flow without logging other stderr.
  • Increase the Antigravity health-check limit to 45 seconds so the packaged Windows runtime can finish initialization.

Tests

  • Added coverage for fragmented helper output, malformed markers, and non-Google URLs.
  • Added regressions for URLs over 8 KiB, duplicate stderr/stdout delivery, and delayed duplicate delivery.
  • Added a fake-clock test for a valid 20-second runtime startup.
  • Focused server suites: 97 tests passed.
  • Targeted lint and the server typecheck passed.

Before - the Windows runtime times out and Google sign-in stays on its starting state:

Antigravity unavailable after the 15-second health check while Google sign-in remains in the starting state

After - the local dev build completes Google sign-in and loads the Antigravity models:

Antigravity authenticated with Google and showing 11 models in the local dev build

Closes #9405

Built with GPT-5.6 Sol in T3 Code.


Note

Medium Risk Touches OAuth URL handling and auth state machine behavior; changes are scoped with validation and tests, but mis-parsed stderr could still affect sign-in reliability.

Overview Fixes Windows Antigravity Google sign-in stuck on "Starting Google sign-in" and false unavailable when the packaged runtime is slow to start.

Stderr browser-helper URLs: Replaces discarding all Antigravity stderr with makeAntigravityStderrHandler, which buffers lines, recognizes T3?s __T3_ANTIGRAVITY_AUTH_URL__ marker, JSON-decodes and validates the Google OAuth URL, and forwards it into the existing auth flow?without surfacing other stderr. The handler is wired in makeAntigravityAcpRuntime only when an authorization callback is configured.

Supporting limits: Raises ACP maxStderrChunkLength from 8 KiB to 32 KiB so ~16 KiB authorization URLs fit in one chunk. Extends the Antigravity provider health-check timeout from 15s to 45s and updates the timeout message accordingly.

Auth deduplication: receiveAuthorizationUrl now ignores a second delivery of the same URL (e.g. stdout + stderr) but still fails the flow if a different second URL arrives.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ee980670830a5e280d080f8effac5e25993279b2. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Forward Google sign-in URLs from Antigravity browser-helper stderr

  • makeAntigravityAcpRuntime now installs a stderr handler that parses browser-helper marker lines, reconstructs URLs split across chunks, and forwards valid authorization URLs to the auth callback; non-auth runtimes skip this handler.
  • Raises AcpSessionRuntime max stderr chunk from 8,192 to 32,768 characters so 16 KiB auth URLs are not truncated.
  • makeAntigravityAuth.receiveAuthorizationUrl now succeeds when it receives the same parsed URL twice instead of failing; a different second URL still fails.
  • Increases checkAntigravityProvider health-check timeout from 15s to 45s.
  • Risk: the stderr parser in antigravityAuthSupport.ts only recognizes exact marker lines within the length limit; malformed or oversized lines are silently discarded.
Macroscope summarized ee98067.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).

      Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c0bbee015dcb540e993aadef8b3da7ca01a10673. Configure [here](https://www.cursor.com/dashboard/bugbot).
    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — The change alters production Google OAuth handling, ACP stderr processing, and the Antigravity health-check timeout default. These authentication and default-behavior changes exceed routine bug-fix auto-approval scope.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. t3dotgg(GitHub profile, opens in a new tab) approved these changes

      Note

      🤖 GPT-6 Astra (preview) responding on behalf of Theo

      Reviewed ee980670. No blocking issues found. Google URL validation stays strict, exact duplicate URLs are ignored, and the 45-second health check applies only to Antigravity. All 83 tests in the four focused suites passed.

Sign in to join this conversation.