agy~swap
Diagnostics

Fix Keychain Prompts, VERIFY Errors, Token Overwrites & Corporate TLS Proxies

Solve common Google Antigravity multi-account errors: repeated macOS Keychain password prompts, HTTP 403 VERIFY gates, overwritten tokens, and Zscaler x509 errors.

macOS Keychain Password Prompts During Switch or Login

When agy or older credential helpers read and write the login keychain frequently, macOS can repeatedly prompt for your login password. Modern agy-swap uses a file-backed session store guard together with /usr/bin/security mirroring and native Security.framework bindings when AGY_SWAP_VAULT=keychain is chosen.

Run agy-swap doctor to inspect your keychain and session wrapper state. If an account was stuck with legacy token_data in accounts.json, migrate it cleanly with agy-swap account migrate --force.

Account Marked VERIFY (HTTP 403 / Further Action Required)

Google sometimes requires account verification before allowing Antigravity API requests. agy-swap automatically detects HTTP 403 responses carrying a Google verification URL and marks the row VERIFY.

# From the TUI: highlight the VERIFY row and press w
# From the CLI:
agy-swap verify dev@company.com

Corporate TLS Inspection (Zscaler, Fortinet, Netskope) & DNS Failures

Corporate proxies replace upstream TLS certificates with an internal root CA, causing x509: certificate signed by unknown authority during installation, agy-swap update, or quota polling.

Environment VariablePurpose
AGY_SWAP_CA_BUNDLEPath to your corporate root CA PEM file (also honors CURL_CA_BUNDLE). Recommended over insecure mode.
AGY_SWAP_RELEASE_MIRRORBase URL of an internal mirror serving release binaries and checksums.txt.
AGY_SWAP_DOH_URLCustom DNS-over-HTTPS endpoint used only after a TLS error (defaults to 1.1.1.1, then 8.8.8.8, ignoring private IPs).
AGY_SWAP_INSECURE=1Disables TLS certificate validation in install.sh / install.ps1 only; SHA-256 checksums are still strictly verified.
# Install while trusting a corporate root CA bundle
curl -fsSL --cacert /path/to/company-ca.pem https://agy-swap.aklkbqx.com/install.sh \
  | AGY_SWAP_CA_BUNDLE=/path/to/company-ca.pem bash

Shadowed Binaries After Upgrading

If agy-swap --version still prints an older release after upgrading with Homebrew or install.sh, run which -a agy-swap to locate a stale binary earlier on PATH (for example in ~/.local/bin alongside /opt/homebrew/bin) and remove the duplicate.

Frequently Asked Questions

Why does agy-swap revert back to my previous account after an hour?

Another running agy process outside the launcher wrapper likely wrote its refreshed token back to ~/.gemini. Run agy-swap doctor to verify the wrapper at ~/.local/bin/agy and ~/.gemini/bin/agy.

What does vault_migration in agy-swap doctor mean?

A credential write could not reach the chosen vault, so the token remained in accounts.json as plaintext token_data. Fix file or keychain permissions and run agy-swap account migrate --force.

How can I debug missing quota pools from Google?

Run AGY_SWAP_QUOTA_DEBUG=1 agy-swap list --refresh to print sanitized quota endpoint diagnostics.

Try agy-swap in your terminal

Install with Homebrew, shell, PowerShell, or Go source, then save your accounts and inspect live quotas locally.

brew install aklkbqx/agy-swap/agy-swap
curl -fsSL --proto '=https' --tlsv1.2 https://agy-swap.aklkbqx.com/install.sh | bash