[DOCS] CLI reference for `claude auth login` and `claude mcp login --no-browser` does not mention the sign-in URL is emitted as a single OSC 8 hyperlink
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/cli-reference
Section/Topic
The CLI commands table — specifically the rows for claude auth login and claude mcp login <name> (which documents --no-browser) under "CLI commands".
Current Documentation
From the CLI commands table at https://code.claude.com/docs/en/cli-reference:
|claude auth login| Sign in to your Anthropic account. Use--ssoto force SSO authentication, and--consoleto sign in with Anthropic Console for API usage billing instead of a Claude subscription |claude auth login --console| |claude mcp login <name>| Run a configured MCP server's OAuth flow without opening the interactive/mcppanel. Works for HTTP, SSE, and claude.ai connector servers. Add--no-browserover SSH to print the authorization URL instead of opening a browser, then paste the redirect URL back at the prompt. Requires Claude Code v2.1.186 or later. See Authenticate from the command line |claude mcp login sentry|
Neither row mentions that the printed URL is a single OSC 8 hyperlink that stays clickable across wrapped lines.
The "Authenticate from the command line" section in https://code.claude.com/docs/en/mcp also describes the --no-browser flow:
As of v2.1.191, the command detects when no local browser is available, such as during an SSH session or on Linux without a display server, and prints the authorization URL instead of trying to open a browser. Open the URL on your local machine, then paste the full redirect URL from your browser's address bar back at the prompt. The command needs an interactive terminal for the paste step, so connect withssh -t. Pass--no-browserto force the URL prompt even when a local browser is detected.
And the "OAuth login fails in WSL2, SSH, or containers" section in https://code.claude.com/docs/en/troubleshoot-install still instructs users to manually copy the URL:
Alternatively, presscat the interactive login prompt to copy the OAuth URL, or copy the URL thatclaude auth loginprints, and open it in a browser on your local machine.
What's Wrong or Missing?
A. The new hyperlink behavior is not documented in the CLI reference
In v2.1.202, Claude Code now emits the sign-in URL printed by claude auth login and claude mcp login --no-browser as a single OSC 8 hyperlink, so it remains clickable (Cmd/Ctrl-click) across terminal line wraps even when the URL is long. This is the same hyperlink output Claude Code already uses elsewhere (see https://code.claude.com/docs/en/statusline for the OSC 8 background). Nothing on the claude auth login or claude mcp login --no-browser rows tells the reader that, so users on SSH sessions don't know the URL is one click away, and they may fall through to the manual copy/<c> workaround instead.
B. The "OAuth login fails" troubleshooting section reads as if the printed URL is hard to use
The Troubleshooting page workaround — "press c at the interactive login prompt to copy the OAuth URL, or copy the URL that claude auth login prints" — predates v2.1.202. In v2.1.202 the URL prints as a single hyperlink and the manual copy is no longer necessary on OSC 8 terminals (iTerm2, Kitty, WezTerm, Ghostty, and most modern terminals). The advice still applies on terminals without OSC 8 support, so the section is OUTDATED rather than INCORRECT — it should be updated to mention the hyperlink and then keep the manual-copy path as the fallback.
C. Cross-reference gap in the MCP section
The MCP page's "Authenticate from the command line" section is the canonical doc for claude mcp login --no-browser, but it doesn't mention the hyperlink guarantee either, so SSH users following that page miss the same context.
Suggested Improvement
A. CLI reference updates
Add a short note about the hyperlink to both rows in https://code.claude.com/docs/en/cli-reference. Suggested wording:
claude auth login: Sign in to your Anthropic account. Use--ssoto force SSO authentication, and--consoleto sign in with Anthropic Console for API usage billing instead of a Claude subscription. As of v2.1.202, the sign-in URL is printed as a single OSC 8 hyperlink, soCmd/Ctrl-click opens it in your browser even when it wraps over SSH. Requires a terminal with OSC 8 hyperlink support (iTerm2, Kitty, WezTerm, Ghostty).claude mcp login <name>: Run a configured MCP server's OAuth flow without opening the interactive/mcppanel. Works for HTTP, SSE, and claude.ai connector servers. Add--no-browserover SSH to print the authorization URL instead of opening a browser, then paste the redirect URL back at the prompt. As of v2.1.202 the printed URL is emitted as a single OSC 8 hyperlink so it stays clickable when it wraps. Requires Claude Code v2.1.186 or later. See Authenticate from the command line.
B. Update the "OAuth login fails in WSL2, SSH, or containers" workaround
In https://code.claude.com/docs/en/troubleshoot-install, replace the "press c to copy the OAuth URL, or copy the URL that claude auth login prints" sentence with something like:
As of v2.1.202, the URL thatclaude auth loginprints is emitted as a single OSC 8 hyperlink, soCmd/Ctrl-click it to open it in your browser even when it wraps across terminal lines. On terminals without OSC 8 support (for example Terminal.app), presscat the interactive login prompt to copy the OAuth URL, or copy the URL manually, and open it in a browser on your local machine.
C. Note in the MCP section
In https://code.claude.com/docs/en/mcp under "Authenticate from the command line", add a sentence such as:
The URL printed in--no-browsermode is emitted as a single OSC 8 hyperlink (Claude Code v2.1.202 or later), soCmd/Ctrl-click it to open it in your browser without having to copy it manually.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Section | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/cli-reference | CLI commands table — claude auth login and claude mcp login <name> rows | No mention of the OSC 8 hyperlink for the printed sign-in URL |
| https://code.claude.com/docs/en/mcp | "Authenticate from the command line" | Canonical doc for claude mcp login --no-browser; doesn't mention hyperlink behavior |
| https://code.claude.com/docs/en/troubleshoot-install | "OAuth login fails in WSL2, SSH, or containers" | Workaround predates v2.1.202 and still reads as if the URL is hard to click |
Total scope: 3 pages affected
Cross-references:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/statusline | Existing documentation of OSC 8 hyperlinks and the FORCE_HYPERLINK escape hatch |
The change is a CLI behavior fix shipped in v2.1.202; the three pages above describe the affected commands but do not yet reflect the new hyperlink output. The v2.1.202 changelog entry says the sign-in URL printed by claude auth login and claude mcp login --no-browser is now emitted as a single hyperlink so it remains reliably clickable when it wraps over SSH.