What
/login is the command that signs you in to your Anthropic account. In cloud sessions (Claude Code running on Anthropic's servers instead of your machine) it changed:
- When enabled: the command is now enabled only when there is no session context or the session has a session id. Before, it was enabled whenever
DISABLE_LOGIN_COMMANDwas not set. - Refused cases: signing in inside a cloud session is refused when the session was started with a Console sign-in, or when
forceLoginMethodrequires a method other than claude.ai. The command is then hidden, with notices such as "Signing in isn't available here: a cloud session needs a claude.ai sign-in, and the forceLoginMethod setting on this machine requires a different sign-in method." - Expired sign-in: a new message says "The claude.ai sign-in this session was using is no longer usable." and tells you to run
/loginorclaude auth loginwhenDISABLE_LOGIN_COMMANDis set.
Why
In cloud sessions you may find /login missing or get an explanation instead, and a lost claude.ai sign-in now tells you how to recover.
Names in the bundle/loginDISABLE_LOGIN_COMMAND
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up /login, on Error reference.
Each of these messages from `/login`, `claude auth login`, or `claude setup-token` means Claude Code couldn't open the port on `127.0.0.1` where your browser returns the sign-in result.errors see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up /login, on Error reference.