t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Antigravity oauth-personal sign-in reports success on Windows, but sessions stay "not logged in" (login not found under the provider's GEMINI_HOME)

Open sashasochka opened this issue 1 week ago • 5 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate. (Related but different: #36033 is Linux with no usable keyring; #39620 is oauth-business.)
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Windows 11, T3 Code 0.1.11 running as the background service (t3 service install), Antigravity provider with authMethod: oauth-personal, managed runtime (binary path empty).
  2. Settings → Providers → Antigravity → Retry installation (managed runtime updates to Antigravity CLI 1.5.13).
  3. Sign in → Open browser → choose the Google account → Sign in → copy the code from antigravity.google/oauth-callback → paste into "Code from the Antigravity page" → Connect.
  4. Start any thread on the Antigravity provider (e.g. via MCP t3_thread_launch, model gemini-4-neon-high).

Expected behavior

After a successful sign-in, Antigravity sessions are authenticated.

Actual behavior

  • The trace shows AntigravityAuth.respond and AntigravityAuth.runSignIn both ending in Success.
  • Every new session still fails: ProviderAdapterOpenSessionError: Failed to open antigravity provider session, caused by AcpRequestError: No browser is available here (this is a remote (SSH) session …). Run agy acp --login ….
  • The ACP log under <profileDirectory>/antigravity-acp/log/ says error getting token source: You are not logged into Antigravity.
  • Provider status stays at "Google account access is not checked yet", with 0 models. Restarting the service does not help.

Impact

Major degradation or frequent failure

Version or commit

T3 Code 0.1.11 (desktop and service), managed Antigravity CLI 1.5.13

Environment

Windows 11 (x64), background service (t3code-<host>-<user> scheduled task), Windows Credential Manager available.

Logs or stack traces

Isolation test with the managed agy.exe from ~/.t3/tools/antigravity-acp/win32-x64/versions/<id>/agy.exe, running agy -p "Reply with exactly: AUTH OK":

Environment Result
GEMINI_HOME=<profileDirectory> + AGY_ACP_FORCE_FILE_STORAGE=1 + fake SSH_CONNECTION (as in antigravityEnvironment) not logged in (prompts for an auth code, then times out)
Same, without AGY_ACP_FORCE_FILE_STORAGE not logged in
Default home (GEMINI_HOME unset → ~/.gemini), with or without AGY_ACP_FORCE_FILE_STORAGE=1 AUTH OK (the user's own agy acp --login from a terminal)

So the Google credentials themselves are fine, and the CLI looks up its login per home folder. The agy acp --login run by AntigravityDriver.codeLogin exits 0, but afterwards nothing new exists under <profileDirectory> (no new files in antigravity-cli/ or antigravity-acp/). The sessions then run with that GEMINI_HOME and find no login. It looks like the code-login child either persists the login somewhere the session runtime doesn't read, or with a different home/storage than antigravityEnvironment gives the sessions.

GEMINI_HOME is set after the instance's environment variables in antigravityEnvironment, so a user cannot work around it from provider settings.

Workaround

Run Gemini through the Codex provider via an OpenAI-compatible proxy (google-antigravity/gemini-4-neon). The native Antigravity provider stays unusable.

sashasochka avatar Nov 20 '26 15:11 sashasochka

I have this issue as well

goncaloalves avatar Nov 20 '26 15:11 goncaloalves

Update: found the cause and a working fix (Windows, T3 0.1.11, managed Antigravity runtime 1.5.13).

Cause. For oauth-personal, T3 starts agy acp with SSH_CONNECTION set and AGY_ACP_FORCE_FILE_STORAGE=1. In that mode agy skips the Windows keyring, where a normal agy login lives, and reads only its file store inside the T3 profile:

%USERPROFILE%\.t3\userdata\providers\antigravity\<hash>\antigravity-acp\antigravity-oauth-token
%USERPROFILE%\.t3\userdata\providers\antigravity\<hash>\antigravity-acp\cache\acp-auth-state.json

In my case no sign-in had ever completed into that store. antigravity-acp\log\acp-login-*.log showed one cancelled flow and one invalid_grant "Invalid code verifier". That error comes from pasting a code from an earlier sign-in link: each attempt has its own PKCE verifier, so a code from an older browser tab is rejected. An acp_token.json left in the same folder by the older 1.1.1 runtime is not read by 1.5.13, and a keyring login can't be copied into the file store. A terminal agy -p with the T3 GEMINI_HOME and no SSH or file-storage variables answers fine, which makes it look like a home-folder problem when it is really a storage-backend mismatch.

Workaround. Do one clean sign-in using T3's exact command, and open only the newest link it prints:

$profileDir = "$HOME\.t3\userdata\providers\antigravity\<hash>"
$env:GEMINI_HOME = $profileDir
$env:SSH_CONNECTION = '127.0.0.1 0 127.0.0.1 0'
$env:AGY_ACP_FORCE_FILE_STORAGE = '1'
$env:AGY_CLI_DISABLE_AUTO_UPDATE = '1'
& "$HOME\.t3\tools\antigravity-acp\win32-x64\versions\<version-hash>\agy.exe" acp --gemini-dir $profileDir --app-data-dir antigravity-acp --login

After that, antigravity-oauth-token appears, a T3 Antigravity thread answers, and the provider lists its models (Gemini 4 Neon, Argon, Hydrogen, the Orchestrators and 3.8 Flash). T3's own UI sign-in should work the same way, as long as only the most recent link is used.

Suggestions for T3. When the token exchange fails with Invalid code verifier, show that error in the UI and tell the user to use the newest link. Optionally, detect a missing antigravity-oauth-token and report "not signed in to T3's Antigravity profile" rather than a generic status.

sashasochka avatar Nov 20 '26 17:11 sashasochka

FYI, I'm on CachyOS (Arch Linux) and this happens as well.

Confirmed this workaround also works on Linux (CachyOS / Arch).

Here is the Bash/Zsh equivalent:

PROFILE_DIR="$HOME/.t3/userdata/providers/antigravity/<profile-hash>"
AGY_BIN="$HOME/.t3/tools/antigravity-acp/linux-x64/versions/<version-hash>/antigravity"

GEMINI_HOME="$PROFILE_DIR" \
SSH_CONNECTION="127.0.0.1 0 127.0.0.1 0" \
AGY_ACP_FORCE_FILE_STORAGE=1 \
AGY_CLI_DISABLE_AUTO_UPDATE=1 \
"$AGY_BIN" acp --gemini-dir "$PROFILE_DIR" --app-data-dir antigravity-acp --login

thanks @sashasochka !

goncaloalves avatar Nov 20 '26 18:11 goncaloalves

Same here: Windows 11, T3 Code 0.1.11 (desktop), managed Antigravity CLI 1.5.13, oauth-personal.

One more data point: Antigravity worked earlier in the day. A child task on gemini-4-hydrogen ran to completion. Then T3 restarted, and every resumed or new Antigravity session failed with Failed to open antigravity provider session, and later Provider is not authenticated. The ACP log after the restart shows:

composite_token_storage.go: Using file-based token storage because SSH session detected
authenticate("oauth-personal") failed: No browser is available here (this is a remote (SSH) session ...). Run `agy acp --login` ...

The profile's antigravity-acp/ folder has no antigravity-oauth-token. It holds only an older acp_token.json from two days earlier, which 1.5.13 doesn't seem to read. So a session can apparently look signed in until the next restart, even though the file store the restarted sessions read was never written.

Dodhon avatar Nov 20 '26 20:11 Dodhon

Not sure if mine is similar or a different issue. Antigravity is currently running Neon, but T3 reports it's not installed and not logged in.

VictorZakharov avatar Nov 22 '26 11:11 VictorZakharov