What
When Claude Code fails to refresh your login, it now shows one of two specific messages:
- Keychain: Claude Code cannot save to the Keychain, the macOS password store. The message suggests running
security unlock-keychain, running Claude Code outside a sandbox (a restricted environment that limits what programs can touch), or retrying and then running/login. - Managed settings: this computer's managed settings require a different way of signing in. The message names
forceLoginMethodorforceLoginGatewayUrl.
Why
Instead of a vague failure, you get the likely cause and steps to fix it.
Names in the bundle/login
/login
Authentication modified, high confidence
If `/login` saved an API key and `CI` isn't set, Claude Code uses that key instead of any of these sources. To remove it, [run `/logout`](https://code.claude.com/docs/en/troubleshoot-install#not-logged-in-or-token-expired).see the edit
/login
Error reference modified, high confidence
| `Managed settings on this machine configure a Cloud gateway sign-in; run interactive /login to authenticate.` | [`claude auth login`](https://code.claude.com/docs/en/cli-reference#cli-commands) |see the edit
/login
Use Claude Code in VS Code modified, high confidence
If the screen says `Login is managed by your organization and must be completed in the terminal.`, update the extension. To sign in without updating, [install the CLI](https://code.claude.com/docs/en/setup.md), click **Run `claude` in term…see the edit
/login
Claude Code changelog modified, high confidence
* Fixed Esc on the Bedrock access keys step closing `/login` instead of going backsee the edit
/login
Sign in through the OS identity broker modified, high confidence
* **Gateway sign-in**: the developer approves the gateway's address and then signs in to the gateway, with `/login` in Claude Code. Until then, Claude Code refuses each prompt.see the edit
/login
Deploy managed settings modified, high confidence
* It signs in to a gateway with `/login`see the edit
/login
Continue local sessions from any device with Remote Control modified, high confidence
* **Authentication**: run `claude` and use `/login` to sign in through claude.ai if you haven't already. Without an eligible login, `claude remote-control` exits with an error, while `claude --remote-control` starts an interactive session …see the edit
/login
Authentication modified, medium confidence
* **Cloud gateway**: if your organization runs a self-hosted [Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway), sign in with corporate SSO through `/login` or [from VS Code](https://code.claude.com/docs/en/vs-code.…see the edit
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 Claude Code changelog.
* Improved the claude.ai sign-in link shown by /login, `claude auth login` and `claude setup-token`: it is now much shorterchangelog see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
/login on Authentication
Anthropic's release notes agree
Fixed the Claude Docs connector's tools going missing when a plugin or MCP server at the same address failed to connect, and its error…