fix(server): Antigravity 1.5 asks for sign-in when it cannot open a browser #36037
main fromrefs/pull/36037/head·merged by maria-rcks View on GitHubProblem#
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"andstatus: "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 callonAuthRequired, so the instance shows "Sign in with Google to use Antigravity." again. - Unchanged: interactive sign-in does not use this check. Other
-32603errors 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, noDISPLAY, and every browser opener shimmed. ACPinitializefollowed byauthenticate {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 sameauthenticate("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 upstreammain(0b0a61a01f) withexpected false to be true, and passes with the fix. The existing negative case, a-32603with 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
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Note
Written by
gpt-6.1-solon behalf of MariaVerified in a real dev environment#
verified unchanged head
5d4ec7fa23dc9306aa76004da07bb5107b2fb5c1on a disposable linux vm. first reproduced ongithub/mainat1c41c5ed898434f97dae7815f57b0914c9aeb0b5in 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 startagainst 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-solturn through the composer. its real git tool call returned the workspace and exact pr head, thenCODEX_PROVIDER_OK. - blacksmith: existing
antigravityAuthSupport.test.ts(29 tests) andAntigravityAdapterV2.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:

after, pr:

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


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.
- main: installing and refreshing the unsigned instance reached the real cli error "no browser is available here". refresh returned the generic failure and kept
maria-rcks merged this2ba4fde
maria-rcks closed this
Sign in to join this conversation.
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
apps/server/src/provider/antigravityAuthSupport.ts,apps/server/src/provider/antigravityAuthSupport.test.ts-32603when the message starts withNo browser is available here. The existing-32000check 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-32603error.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-rcksMerge Risk:
Minimal · up to
5d4ecHeadless 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:
4
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
#36033and#36034and 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)
2610dccf-b04e-4c4a-a0bc-3aa1efaa71e2Reviewing files that changed from the base of the PR and between 0af8be3bb1ebde73e6f71aa05b0bfaa59a0728c2 and 5d4ec7fa23dc9306aa76004da07bb5107b2fb5c1.
apps/server/src/provider/antigravityAuthSupport.test.tsapps/server/src/provider/antigravityAuthSupport.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.