Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity 1.5 asks for sign-in when it cannot open a browser #36037

Mergedsittingmongoose(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/36037/headmerged by maria-rcks View on GitHub

Problem

On a host with no display, the native Antigravity CLI 1.5.x cannot open a browser for an instance that has no stored sign-in. It answers authenticate with:

-32603 No browser is available here (no graphical display is available to open a browser). Run `agy acp --login` in a terminal on this machine, then retry; or use a Gemini API key.

T3 counted only -32000 (or its own blocked-login message) as "sign-in required". When this happens:

  • Model refresh: it fails with the generic "Could not refresh Antigravity models. The previous model list is unchanged."
  • Instance status: it keeps auth.status: "authenticated" and status: "ready".
  • New sessions: they fail without being marked as needing sign-in.

This is how it looks on a headless Linux server right after the 1.4.5 → 1.5.x update signs its instances out (#36033). It is the no-display half of the status problem in #36034.

Change

isAntigravitySignInRequiredError also accepts a -32603 error whose message starts with the CLI's fixed "No browser is available here" text.

  • Background paths that now report sign-in required: the model refresh, session start (requiresSignIn) and text generation. They call onAuthRequired, so the instance shows "Sign in with Google to use Antigravity." again.
  • Unchanged: interactive sign-in does not use this check. Other -32603 errors are still not counted as sign-in required.

Part of #36034. The rest of that issue is not addressed here: the case where a display exists and 1.5.x opens a browser on the server and waits, and in-app sign-in for 1.5.x. Both need the sign-in flow to change.

Verification

  • Where the error comes from: I ran the public 1.5.8 linux-x64 CLI the way T3 launches it: acp --gemini-dir <scratch> --app-data-dir antigravity-acp, a scratch profile, no stored sign-in, no DISPLAY, and every browser opener shimmed. ACP initialize followed by authenticate {methodId: "oauth-personal"} returned exactly the error above. A separate run of T3's own launch environment on a Linux server without a display logged the same authenticate("oauth-personal") failed: No browser is available here … (code -32603).
  • New row: antigravityAuthSupport.test.ts > "recognizes native auth-required errors and the blocked-login transport error" fails on upstream main (0b0a61a01f) with expected false to be true, and passes with the fix. The existing negative case, a -32603 with other text, still is not treated as sign-in required.
  • vp test run src/provider/antigravityAuthSupport.test.ts: 29 passed.
  • vp run check:changed --concurrency 1: format, lint, both knip checks, graphql, typecheck (3 packages) and tests (2 files, 31 tests) passed.

Not checked

A real signed-out instance going through refresh in a running T3 server. That needs a Google account on a display-less host. The status change after onAuthRequired is existing behavior that this PR only reaches in one more case.

Written by Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

    1. tanstack-source added labelsbug

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      The sign-in error predicate now recognizes the Antigravity CLI’s no-browser ACP response with code -32603. A test verifies that the response is classified as sign-in required.

      Changes: Antigravity authentication

      Layer / File(s)Summary
      Recognize no-browser sign-in errors
      apps/server/src/provider/antigravityAuthSupport.ts, apps/server/src/provider/antigravityAuthSupport.test.ts
      The predicate recognizes ACP request errors with code -32603 when the message starts with No browser is available here. The existing -32000 check remains. A test covers the new response.

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

      Change: Bug fix

      Possibly related issues

      • pingdotgg/t3code#36034 — The change implements the issue’s suggested detection for the no-browser -32603 error.
      • pingdotgg/t3code#36033 — The change addresses the no-browser refresh case described in the issue; it does not address the keyring migration cause.

      Suggested reviewers: macroscopeapp, juliusmarminge, maria-rcks

      Merge Risk: Minimal · up to 5d4ec

      Headless Antigravity 1.5 hosts with no stored sign-in will now be told to sign in, instead of getting a generic error, during model refresh, session start and text generation. Other -32603 errors are still excluded. No concrete merge-blocking risk remains.

      Pre-merge checks: Passed 4

      Check nameStatusExplanation
      Title checkPassedThe title names the main change: Antigravity 1.5 sign-in detection when no browser can open. It follows the conventional commit format and is specific. The title is accurate and matches the code and t…
      Description checkPassedThe description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the error text and the affected behavior. The Change section explains the scop…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title names the main change: Antigravity 1.5 sign-in detection when no browser can open. It follows the conventional commit format and is specific. The title is accurate and matches the code and test changes.

      Full details: Description check

      Explanation

      The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the error text and the affected behavior. The Change section explains the scope of the fix and what stays unchanged. The Scope section links issues #36033 and #36034 and says the fix is a bug fix. The Verification section lists the focused test, the test result on upstream main, the check run, and what was not checked. It ends with the model and harness line the template asks for.

      Finishing Touches

      Generate unit tests (beta)

      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Recent review info

      Run configuration

      Commits

      Reviewing files that changed from the base of the PR and between 0af8be3bb1ebde73e6f71aa05b0bfaa59a0728c2 and 5d4ec7fa23dc9306aa76004da07bb5107b2fb5c1.

      Files selected for processing: 2

      • apps/server/src/provider/antigravityAuthSupport.test.ts
      • apps/server/src/provider/antigravityAuthSupport.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.

    4. maria-rckscommented

      Note

      Written by gpt-6.1-sol on behalf of Maria

      Verified in a real dev environment

      verified unchanged head 5d4ec7fa23dc9306aa76004da07bb5107b2fb5c1 on a disposable linux vm. first reproduced on github/main at 1c41c5ed898434f97dae7815f57b0914c9aeb0b5 in a separate worktree. installed dependencies on both and ran one dev server at a time, with isolated state and no display variables. drove the web app with repository playwright and /usr/bin/google-chrome. installed the real antigravity 1.5.11 cli through provider settings; no mocks or seeded authentication.

      • main: installing and refreshing the unsigned instance reached the real cli error "no browser is available here". refresh returned the generic failure and kept auth.status: "unknown" / "sign-in not checked".
      • pr: the same flow changed authentication to unauthenticated, displayed "sign in with google to use antigravity", and returned the actionable refresh error. repeated refresh remained usable and retained that state.
      • started a real unsigned antigravity session through t3 thread start against the dev server. it failed promptly, and opening its thread in the client showed the sign-in banner and provider-setup action.
      • created a project pointing at this git repository through the app and sent a codex gpt-6.1-sol turn through the composer. its real git tool call returned the workspace and exact pr head, then CODEX_PROVIDER_OK.
      • blacksmith: existing antigravityAuthSupport.test.ts (29 tests) and AntigravityAdapterV2.test.ts (15 tests) passed, including existing auth-required and unrelated-error cases. the head also has 31 successful ci checks.

      short runtime transcript from the real client/server exchange:

      settings -> server.refreshProviders { refreshModels: true, reloadSecrets: true }
      main: ProviderSetupError / refresh-models
        Could not refresh Antigravity models. The previous model list is unchanged.
        auth: unknown
      pr: ProviderSetupError / refresh-models
        Sign in to Antigravity in provider settings before refreshing models.
        auth: unauthenticated
      native cli cause on both:
        No browser is available here (this is a remote (SSH) session, so the browser's sign-in redirect can't reach this machine).

      before, main:

      main retains unchecked authentication after the native cli error

      after, pr:

      pr shows the antigravity sign-in requirement

      repeated refresh, with loading frames trimmed (animated copy for github; uploaded video playback and seeking were also checked):

      refresh returns to the antigravity sign-in state

      real codex turn reads the pr head through the app

      Not verified

      • successful google oauth or authenticated antigravity generation: no google account was supplied. interactive sign-in was attempted and immediately showed "google sign-in failed. start sign-in again"; fixing that flow is outside this pr's stated scope. cancellation could not be exercised because it had already failed.
      • the separate antigravity text-generation path, a previously authenticated account becoming signed out, and older cli versions were not exercised. the fresh unsigned refresh and session paths above were exercised.
      • native desktop/mobile clients, macos/windows, and relay/tunnel connections were not exercised on this linux web setup.
    5. maria-rcks merged this2ba4fde

    6. maria-rcks closed this

Sign in to join this conversation.