[Bug] Antigravity CLI (agy) fails to persist authentication state in WSL 2 environment

I had the same issue too.

Antigravity itself told me its because WSL is headless and is missing the OS keyring to save the CLI tokens in.

I managed to fix it by installing gnome-keyring.

sudo apt update && sudo apt install -y dbus-x11 libsecret-1-0 gnome-keyring

And then adding this to my .bashrc to start the keyring service

if [ -n "$BASH_VERSION" ]; then
    export $(dbus-launch)
    eval "$(echo "" | gnome-keyring-daemon --unlock)"
    eval "$(gnome-keyring-daemon --start)"
    export SSH_AUTH_SOCK
fi