Skip to content

fix(server): stop blaming Google sign-in for Antigravity session errors - #10137

Closed
rizakara wants to merge 1 commit into
pingdotgg:mainfrom
rizakara:fix/antigravity-post-auth-session-error
Closed

fix(server): stop blaming Google sign-in for Antigravity session errors#10137
rizakara wants to merge 1 commit into
pingdotgg:mainfrom
rizakara:fix/antigravity-post-auth-session-error

Conversation

@rizakara

@rizakara rizakara commented Sep 5, 2026

Copy link
Copy Markdown

Antigravity setup runs authenticate and then a session/new probe in the same flow. When that probe fails, safeAuthFailure has no case for it and falls through to "Google sign-in failed. Start sign-in again." — even though Google succeeded and acp_token.json was already written. Acting on that banner means signing out, which deletes the token that was working, so the user loops forever.

An AcpRequestError already carries the method it failed on, so a session/* failure can be recognised as post-authentication and reported as such. initialize is deliberately left alone: it runs before authenticate, so the existing wording is still correct there.

  • Before: Google sign-in failed. Start sign-in again.
  • After: Signed in, but Antigravity could not start a session. Retry without signing out.

On the underlying failure from #9655: it is not the throwaway setup cwd, as that issue guessed. The agent's own log shows session/new dying in the harness handshake with Failed to parse initial message: proto: (line 3:5): unknown field "cascadeid". agy_acp_server 1.1.1 serializes HarnessConfig.cascade_id as lowercase cascadeid, and the localharness_external binary shipped in the same archive only accepts cascadeId. Probing that harness directly confirms it: cascadeId parses, cascadeid produces exactly the reported error, and Go's protojson reports unknown field names verbatim. cascade_id comes from a session id the agent generates itself, so nothing T3 sends reaches it, and the ACP registry still lists 1.1.1 as current — there is no newer build to pin. That part is not fixable here; this PR only stops T3 from misreporting it as a sign-in failure and pushing users into a destructive sign-out.

Fixes #9655

🤖 Generated with Claude Code

Note

Fix safeAuthFailure to report session/* ACP errors as Antigravity session failures, not Google sign-in failures

  • Adds handling in safeAuthFailure (AntigravityAuth.ts) for ACP request errors whose method starts with session/. When no earlier case matches, the formatter now reports sign-in succeeded but Antigravity could not start a session, advising retry without signing out.
  • Updates the auth test harness (AntigravityAuth.test.ts) so the discovered deferred can fail with AcpErrors.AcpError, and adds a test verifying the corrected failure classification after a session/new error.

Macroscope summarized 9bd867a.

Antigravity setup runs `authenticate` and then a `session/new` probe in the
same flow. When the probe fails, `safeAuthFailure` had no case for it and fell
through to "Google sign-in failed. Start sign-in again." — even though Google
had succeeded and `acp_token.json` was already written. Following that banner
means signing out, which deletes the working token.

Map an ACP request error on a `session/*` method to a message that says the
sign-in worked and tells the user not to sign out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The production change alters user-facing handling of post-authentication ACP failures in the Google credential flow and advises users not to sign out, while the accompanying test covers the targeted session/new case. Because this touches sensitive authentication behavior, the change warrants human review despite its narrow scope.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge

Copy link
Copy Markdown
Member

Superseded by #9919 (merged), which already distinguishes Antigravity session/new auth failures from Google sign-in failures. Closing this as a leftover duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Linux Antigravity: Google OAuth succeeds, then setup session/new Internal error is shown as "Google sign-in failed"

2 participants