[Bug]: Antigravity Sign in cannot finish with the native CLI 1.5.x: T3 never receives its Google link ("has not reached Google after 30 seconds") #36034
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Related, not duplicates: #29039 (closed; the same "Broken IPv6" hint, but there the runtime hung at startup), #9624 (older runtime), #36033 (the 1.4.5 → 1.5.x update signs Linux instances out, which is how I ended up needing this sign-in).
Area#
apps/server
Steps to reproduce#
- Use the managed Antigravity CLI 1.5.8 on a server where the T3 client's browser is not on the server machine. Here that is a Linux VM running the standalone T3 service, reached from another computer.
- Settings → Providers → Antigravity → Sign in with Google on an instance that has no stored sign-in.
- Wait.
Expected behavior#
T3 shows a Google sign-in link that I can open on the device I'm using and finish, as it does with the 1.4.5 runtime ("Open the Google sign-in link. If you are remote, paste the redirect URL here.").
Actual behavior#
In-app Sign in never gets a link. After 30 s T3 shows:
Antigravity has not reached Google after 30 seconds. Check this machine's network connection. Broken IPv6 is a common cause.
The flow then times out. The network was fine: every Google endpoint the runtime uses answered over IPv4 in under 0.15 s, and the host has no IPv6 route.
I drove each runtime the way T3 launches it: T3's environment (including its BROWSER helper), acp --gemini-dir <profile> --app-data-dir antigravity-acp, then ACP initialize and authenticate {methodId: "oauth-personal"}. Each run used a scratch profile, and every browser opener on PATH was replaced by a shim that only logs.
| Runtime | What authenticate does | Can T3 use it? |
|---|---|---|
1.4.5, DISPLAY set | Within 4 s it calls T3's BROWSER helper, so stderr gets __T3_ANTIGRAVITY_AUTH_URL__"https://accounts.google.com/o/oauth2/v2/auth?…&redirect_uri=http://127.0.0.1:<port>/…" | Yes |
1.5.8, DISPLAY set | Ignores BROWSER and runs xdg-open "https://accounts.google.com/o/oauth2/auth?access_type=offline&…&code_challenge_method=S256&…&redirect_uri=http%3A%2F%2Flocalhost%3A<port>%2Fauth%2Fcallback&…" on the server's own display. Prints nothing on stdout or stderr. | No. T3 never sees a link, and the browser opens on a screen nobody is watching. |
1.5.8, no DISPLAY | Fails within about 10 s 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." | No. T3 shows a generic sign-in failure. |
Even if T3 intercepted the 1.5.x link, it would reject it:
- The parser expects the 1.4.5 link shape.
parseAntigravityAuthorizationUrl(apps/server/src/provider/antigravityAuthSupport.ts:509-525) requires the path/o/oauth2/v2/authand aredirect_urimatching^http://127\.0\.0\.1:<port>/$. 1.5.x uses/o/oauth2/authwithhttp://localhost:<port>/auth/callback. - Rejected links are dropped silently. The stderr handler discards any link that fails that check (
:621-622). - The 30-second hint measures only "no link received". It starts once
initializeanswers (apps/server/src/provider/AntigravityAuth.ts:37,:44,:302) and checks no network. Its IPv6 wording fits the old Python runtime, not the Go CLI.
Background launches wait 90 s, and the instance still shows as signed in. This happens when a model refresh (after an update, or from Refresh provider status) or a new session reaches authenticate on an instance without a stored sign-in:
- With a display: 1.5.x opens a browser on the server and waits.
refreshModelstimes out after 90 s (AntigravityDriver.ts:517). - Without a display: 1.5.x returns the
-32603error above. - Neither is treated as "sign-in required". Only
-32000or T3's own sign-in message count (antigravityAuthSupport.ts:166-171,AntigravityDriver.ts:527-529). The instance keepsauth.status: "authenticated"andstatus: "ready", and each session start waits about 90 s.
Impact#
Blocks work completely
Version or commit#
0.1.10-nightly.20261113.4616 (main @ 0b0a61a01f has the same code). Managed Antigravity CLI 1.5.8 (1.5.8-4602374149505024/linux-x64); 1.4.5 (agy_acp_server 1.4.5) for comparison.
Environment#
Ubuntu x64 VM, standalone T3 server run as a service, reached from other computers. The service environment has DISPLAY set to a local X session nobody watches. Google personal sign-in (oauth-personal).
Logs or stack traces#
# 1.5.8 runtime log, two in-app sign-in attempts from T3
ACP authenticate: methodId="oauth-personal" meta=map[]
Opening browser for ACP sign-in (method=consumer, redirect=http://localhost:<port>/auth/callback)
authenticate("oauth-personal") failed: Sign-in was cancelled. (code -32800) # ~5 min later, when T3 gave up
Suggested direction:
- Use the CLI's own headless login for in-app sign-in on 1.5.x.
<agy> acp --login --gemini-dir <profile> --app-data-dir antigravity-acpprintsOpen this link in a browser to log in with Google:and a link whoseredirect_uriishttps://antigravity.google/oauth-callback. Google's page there shows a code, and the CLI reads that code, or the landing URL, from stdin. That works when the browser is on another device. T3 could show the link and write the pasted code to stdin, much like its current "paste the redirect URL" step. - Stop background 1.5.x launches from opening a browser on the server. Treat its "No browser is available here" error as sign-in required, so the instance shows "Sign in" instead of staying ready.
- Drop the IPv6 wording from the 30-second hint for 1.5.x.
Workaround#
Run the same acp --login command in a terminal on the server against the instance's profile directory, or keep the host on 1.4.5.
tanstack-source added labelsbug
Another reproduction on the versions from the last comment (managed Antigravity CLI 1.5.9, T3
0.1.10-nightly.20261116.4761, Linux x64, headless server,oauth-personal). Two things from this run that aren't covered above:1. The runtime's own advice signs you in where T3 doesn't look. The
-32603message saysRun `agy acp --login` in a terminal on this machine. Doing that succeeds, but without--gemini-dir/--app-data-dirthe token lands in~/.gemini/antigravity-cli/antigravity-oauth-token. The login log showsappDataDir=~/.gemini/antigravity-cli, while T3's ACP launch logsappDataDir=<profile>/antigravity-acp. So the message sends people to a sign-in T3 never sees, and nothing explains why sessions still fail. Wherever T3 shows this error, it should replace the runtime's advice with its own: the Settings sign-in, or the exact--gemini-dir <profile> --app-data-dir antigravity-acpcommand for that instance.2. Delegated sub-agents get no reason at all, and the session open is retried. A
delegate_taskchild on Antigravity fails with onlyFailed to open antigravity provider session provider-session:…. The real cause appears only in the server log, four levels of wrapped errors deep (ProviderTurnStartError→ProviderSessionOpenError→ProviderAdapterOpenSessionError→AcpRequestError). Theprovider-turn.starteffect runs 4 times per child (attemptCount1–4,nonRetryable: false), though a missing sign-in can't succeed on retry. Classifying the "No browser is available here" error as sign-in required, as suggested above, would probably fix both. The delegate's failure message should also carry the actual cause.Repro for (2): on a headless server with an Antigravity instance that isn't signed in, start a
delegate_taskchild withtarget: { providerInstanceId: "antigravity", model: "gemini-4-carbon" }. It fails within about 5 s, and the server log shows fourOrchestration effect execution failedwarnings for the same effect.The workaround in this issue (
acp --login --gemini-dir <instance profile> --app-data-dir antigravity-acp) fixed it here too: after it, the samedelegate_taskchild ongemini-4-carboncompleted normally.Investigated with Claude Opus 5.5 in Claude Code, running inside T3 Code, following the triage playbook.
Another reproduction, on a setup not covered yet: the Windows desktop app with a WSL2 backend (Settings → Sharing & access → WSL distro).
- T3 Code 0.1.10 (stable), Windows 11 desktop app, server running in WSL2 (Arch Linux)
- Managed Antigravity CLI 1.5.10,
oauth-personal .wslconfig:guiApplications=false,networkingMode=mirrored, so there is noDISPLAY/WAYLAND_DISPLAYin the distro
Sign in with Google fails right away with the
-32603"No browser is available here (no graphical display is available to open a browser)" error. The desktop app shows only a generic failure.I drove
acp --gemini-dir <scratch profile> --app-data-dir antigravity-acpwith ACPinitialize+authenticate {methodId: "oauth-personal"}and compared environments:Environment authenticateAs launched (no DISPLAY)-32603"No browser is available here"WSL_DISTRO_NAME/WSL_INTEROP/WSLENVremovedSame error, so the check is not WSL-specific DISPLAY=:99No error, waits for the browser flow So the cause is the display check described above, not WSL itself. This setup still matters: the browser the user wants to sign in with is right there on the Windows host running the T3 desktop app, yet there is no in-app path to it.
The workaround from this issue works, but finding the command was the hard part. This is what I had to run in a WSL terminal:
~/.t3/tools/antigravity-acp/linux-x64/versions/713ae840845d74736e2d4a96f5d84e3353d614e73a875793ddf500997ccee095/antigravity acp \ --gemini-dir ~/.t3/userdata/providers/antigravity/ac0a3dfd6dddb20962cecff6ee5fe65e19d3923be20e52c5ab52ff877f7e4c32 \ --app-data-dir antigravity-acp \ --loginThen I opened the printed link in the Windows browser and pasted the code back. The instance became
authenticated.Neither path is shown anywhere in the UI or the docs:
versions/<release id>is the managed runtime's release hash. I had to read it fromlinux-x64/active.json, and it changes on every runtime update.providers/antigravity/<sha256 of the instance id>is the instance's profile directory. I only found it by reading the server trace and runtime logs, and then the source, whereresolveAntigravityInstanceDirectorieshashes the instance id. Every additional Antigravity instance gets a different directory.--gemini-dirand--app-data-dir antigravity-acpcome frombuildAntigravityAcpSpawnInput. Without both, the login succeeds but lands in~/.gemini/antigravity-cli. That is exactly what the error message's own advice (agy acp --login) does, so following it leaves T3 still signed out with no explanation.
So in practice, getting the in-app error to a working sign-in meant digging through server traces, runtime logs and the bundled server source. Most users won't get there. Until in-app sign-in works headless, T3 should at least show this exact command, with the paths filled in for the instance, wherever it surfaces the
-32603error.A fix for the no-display case is in #38386. When
authenticatereturns the "No browser is available here" error, T3 runsagy acp --loginin the instance profile, shows its Google link, and asks for the code from the Antigravity page. I tested a full sign-in on a headless arm64 Linux server with CLI 1.5.10. The PR has the logs and screenshots.The open PR limit closed the PR because I have older PRs open. I will reopen it when one of them closes. Until then, the branch is
RVZO6:fix/antigravity-headless-sign-in.Note
🤖 Claude Opus 5.5 (Claude Code) responding on behalf of Brendan
Another reproduction on a headless Raspberry Pi 5 (Linux arm64) with the stable build and the newest managed runtime: 1.5.12 still fails the same way, and
agy acp --loginin the instance profile works around it.- T3 Code: 0.1.10 stable, running as a
systemd --userservice; the client is the macOS desktop app 0.1.10, connected remotely - Managed Antigravity runtime: 1.5.12 (
~/.t3/tools/antigravity-acp/linux-arm64),oauth-personal, no previous sign-in on this instance - Result: all 17 Sign in with Google attempts (every one on 1.5.12) fail within seconds. Each agent log shows:
composite_token_storage.go:586] Failed to load stored token from keyring, falling back to file: The name org.freedesktop.secrets was not provided by any .service files auth_handlers.go:144] authenticate("oauth-personal") failed: 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. (code -32603) - Provider cache afterwards:
status: "warning",auth.status: "unknown", "Antigravity is installed. Google account access is not checked yet." - Workaround: running the managed binary in the instance profile prints a Google link with
redirect_uri=https://antigravity.google/oauth-callbackand asks for the code, so no local browser or loopback port is needed:
Verified: after pasting the code, the CLI logsP=<stateDir>/providers/antigravity/<instance-key> GEMINI_HOME="$P" <managed antigravity binary> acp --gemini-dir "$P" --app-data-dir antigravity-acp --loginconsumerOAuth: authentication completed successfullyand writes<profile>/antigravity-acp/antigravity-oauth-token. After Refresh provider status, T3 reportsstatus: "ready",auth.status: "authenticated", with 9 models, and the next ACP launch logsChainedAuth: authenticated via keyring (effective: keyring). Usage limits stay unavailable (acp_token.jsonis still never written, #34327).
This is the same terminal flow that #38386 drives from the UI.
- T3 Code: 0.1.10 stable, running as a
Another reproduction on Windows desktop + WSL2 backend, with WSLg enabled, and a workaround that works.
- Windows desktop app with a WSL2 environment, Ubuntu 24.04.5,
networkingMode=mirrored - Managed Antigravity runtime 1.5.12,
oauth-personal - WSLg is on, so
DISPLAY=:0/WAYLAND_DISPLAY=wayland-0are set. The runtime does not return the -32603 "No browser is available here" error, so the headless fix in #38386 wouldn't trigger. Instead it logsOpening browser for ACP sign-in (method=consumer, redirect=http://localhost:<port>/auth/callback)and callsxdg-open, which fails on T3's quotedBROWSERhelper (xdg-utils1.1.3, same as #38787). Sign-in stays instartinguntil the 5-minute timeout, with the "Broken IPv6" hint.
Workaround: a
~/.local/bin/xdg-openshim (first on the runtime'sPATH). When$BROWSERcontains__T3_ANTIGRAVITY_AUTH_URL__, it runs the helper withshlex.splitand opens the URL in Windows with:/mnt/c/Windows/System32/rundll32.exe url.dll,FileProtocolHandler ""
Everything else goes to
/usr/bin/xdg-open. With mirrored networking, thelocalhostcallback reaches the runtime in WSL, and sign-in completes.Note:
explorer.exe "<url>"is not a safe choice here. With the long OAuth URL it opened File Explorer instead of the browser.- Windows desktop app with a WSL2 environment, Ubuntu 24.04.5,
Note
🤖 Claude Opus 5.5 (Claude Code) responding on behalf of cloudbring
Another reproduction on a headless Linux x64 server (no
DISPLAY) with today's nightly, plus three details not covered above.- T3 Code:
0.1.11-nightly.20261119.4918 - Antigravity CLI: 1.5.8 and 1.5.12,
oauth-personal - Result: 48 ACP logs in the instance profile (Nov 13 to Nov 19) all end with the
-32603"No browser is available here" error. The Settings Account row only shows "Google sign-in failed. Start sign-in again." Model refresh then fails with "Sign in to Antigravity in provider settings before refreshing models", anddelegate_taskto Antigravity fails withprovider_unavailable.
New details:
- Setting
GEMINI_HOMEdoes not redirect--login.GEMINI_HOME=<profile> AGY_ACP_FORCE_FILE_STORAGE=1 agy acp --login --app-data-dir antigravity-acp, run without--gemini-dir, still wrote the token to~/.gemini/antigravity-acp/antigravity-oauth-token, not the profile. The workaround needs--gemini-dir <profile>, as in the commands above. The settingantigravityEnvironmentpasses is not enough. - Copying the token works; symlinking it does not. Copying
~/.gemini/antigravity-acp/antigravity-oauth-tokento<profile>/antigravity-acp/antigravity-oauth-token(mode 600) madeinitialize+authenticate {methodId: "oauth-personal"}succeed under T3's arguments. After one Refresh provider status, T3 listed the models anddelegate_tasktogemini-4-neonstarted. A symlink at the same path (or in<profile>/antigravity-cli/) still got the-32603error. The CLI-login token in~/.gemini/antigravity-cli/is a different file and does not work for ACP at all. - The failed sign-in message is not cleared. After the refresh, Settings → Providers → Antigravity shows Status "Authenticated · Google account" and Account "Signed in". The Account row still also shows "Google sign-in failed. Start sign-in again." That message is the last flow's
failedstate fromfinishFlow(apps/server/src/provider/AntigravityAuth.ts:231-250at 80cf4f7945), and nothing resets it when the provider later reports authenticated another way. The headless fix in #38386 would make this path rarer, but any out-of-band sign-in (terminal workaround, token import) hits it.
- T3 Code:
Another case of the "no
DISPLAY" row, this time on a Linux desktop, not a headless server.- T3 Code 0.1.11-nightly.20261119.4941, background systemd user service (
t3code.service), Arch/CachyOS, niri (Wayland) - Managed Antigravity CLI 1.5.x,
oauth-personal
The service starts at boot, before the compositor imports
DISPLAY/WAYLAND_DISPLAYinto the systemd user manager. The server process never gets them, thoughsystemctl --user show-environmentlists them later.antigravityEnvironment()passesprocess.envthrough, so the CLI answersauthenticatewith-32603"No browser is available here", and the UI shows "Google sign-in failed. Start sign-in again."T3 already handles this for file opening:
readGraphicalSessionEnv()inapps/server/src/process/externalLauncher.tsreadsDISPLAY/WAYLAND_DISPLAY/XAUTHORITYfrom the user manager over D-Bus when the process lacks them. Giving the Antigravity launch the same values would fix sign-in on desktop boot services without the headless--loginflow.Workaround:
systemctl --user restart t3code.serviceafter logging in, or runacp --loginagainst the instance profile as described above.Triage by Claude Opus 5.5 (Claude Code) in T3 Code.
- T3 Code 0.1.11-nightly.20261119.4941, background systemd user service (
Reproduced on main @ 420d1b59003 on a headless Linux host with agy 1.5.12: Settings → Providers → (new Antigravity instance, Google account) → Sign in fails with the generic 'Google sign-in failed. Start sign-in again.' The server trace has the real cause, which the UI drops:
No browser is available here (no graphical display is available to open a browser). Runagy acp --loginin a terminal on this machine, then retry; or use a Gemini API key.What does work on the same host, and is the shape of a fix: run the CLI's own login against the instance profile with the arguments T3 already uses,
GEMINI_HOME=<profile> AGY_ACP_FORCE_FILE_STORAGE=1 agy acp --gemini-dir <profile> --app-data-dir antigravity-acp --login. It prints a Google link whose redirect ishttps://antigravity.google/oauth-callbackand then waits on stdin: 'paste the authorization code, or the full URL of the page you land on'. Opening the link on any other device, then pasting the code back, signs the instance in (Logged in as …); after a provider refresh T3 shows 'Authenticated · Google account'. So T3 can support headless/remote sign-in by relaying that link to the client and sending the pasted code to the process's stdin, instead of depending on a local browser.Also seen: after that out-of-band sign-in the card shows 'Signed in.' together with the stale 'Google sign-in failed. Start sign-in again.' line.
juliusmarminge closed this
smirea(GitHub profile, opens in a new tab) linked this to #39509
Sign in to join this conversation.
Opened the upstream side of this with Google: https://github.com/google-antigravity/antigravity-cli/issues/1580. It asks ACP
authenticateto hand the remote-friendly--loginlink and code step to the client, or at least to honour$BROWSERagain and return a distinguishable error when there's no display.Also confirming the "no
DISPLAY" row here still reproduces on managed Antigravity CLI 1.5.9 with T3 0.1.10-nightly.20261116.4761, on a truly headless server (no X/Wayland). The provider page only shows "Google sign-in failed. Start sign-in again."; the runtime log has the -32603 "No browser is available here" error. WithDISPLAYset, 1.5.9 still callsxdg-opendirectly and ignoresBROWSER. The workaround in this issue (acp --login --gemini-dir <instance profile> --app-data-dir antigravity-acpin a terminal) works.