Skip to content

fix(server): Antigravity 1.5.16 keeps Google sign-ins in profile file storage - #13

Open
ethanlee66 wants to merge 1 commit into
mainfrom
fix/antigravity-force-file-token-storage
Open

ethanlee66 wants to merge 1 commit into
mainfrom
fix/antigravity-force-file-token-storage

Conversation

@ethanlee66

Copy link
Copy Markdown
Owner

Starting in agy 1.5.16, codeassistclient.sshDetector.Detect checks probeDarwinKeychainUnlocked() on macOS, so injecting SSH_CONNECTION alone no longer bypasses an unlocked login keychain. As a result, agy stores refreshed tokens back into the shared macOS keychain (gemini / antigravity) and removes the profile's antigravity-oauth-token file, breaking per-instance account isolation and causing antigravityUsageLimits.ts to report Sign in with Google to see Antigravity limits. for oauth-personal instances.

This change adds AGY_CLI_FORCE_FILE_TOKEN_STORAGE to removedEnvironmentKeys and sets AGY_CLI_FORCE_FILE_TOKEN_STORAGE: "1" alongside SSH_CONNECTION for oauth-personal instances in apps/server/src/provider/antigravityAuthSupport.ts (preserving SSH_CONNECTION for earlier 1.5.x builds and leaving oauth-business, gemini-api-key, and agent-platform unchanged), and updates unit tests in apps/server/src/provider/antigravityAuthSupport.test.ts.

Verified by:

  • Inspecting agy 1.5.16 logs and binary (codeassistclient.forceFileFromEnv / sshDetector.Detect), confirming 1.5.15 logged Using file-based token storage because SSH session detected while 1.5.16 skipped file storage on an unlocked macOS keychain unless AGY_CLI_FORCE_FILE_TOKEN_STORAGE is 1 or true.
  • vp test run apps/server/src/provider/antigravityAuthSupport.test.ts apps/server/src/provider/antigravityUsageLimits.test.ts apps/server/src/provider/Drivers/AntigravityDriver.test.ts (59 passed, 1 skipped Windows-only credential test on macOS).
  • vp run check:changed (format, lint, knip, graphql, typecheck, and changed tests passed).

Done by Gemini 4 Neon (Orchestrator) in Antigravity (T3 Code).

… storage

agy 1.5.16 checks probeDarwinKeychainUnlocked() inside sshDetector.Detect on macOS, so setting SSH_CONNECTION alone no longer bypasses an unlocked login keychain. Set AGY_CLI_FORCE_FILE_TOKEN_STORAGE=1 alongside SSH_CONNECTION for oauth-personal instances and strip ambient values in removedEnvironmentKeys.
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S labels Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants