Hey, thanks for the detailed report. This isn’t a Cursor auth flow bug, it’s a binary name collision.
Both Grok CLI and Cursor CLI install an executable named agent into ~/.local/bin. Whichever one was installed or updated last overwrites the symlink. Right now agent points to the Grok binary, so agent login opens grok.com and agent models only shows grok-4.5. Cursor CLI isn’t being called at all. It doesn’t read ~/.grok/auth.json, the agent command is simply resolving to Grok.
The easiest fix is to run Cursor CLI via cursor-agent. Cursor installs this separate symlink next to agent, and you already have it in ~/.local/bin. It points directly to the Cursor binary and doesn’t conflict with Grok, so cursor-agent login, cursor-agent models, etc will work with Cursor no matter who currently owns agent.
If you want the agent name to point back to Cursor, reinstall the CLI via curl https://cursor.com/install -fsS | bash, but note that the next Grok auto update might grab it again. So cursor-agent is the more stable option.