Login flow: two UX bugs when using without X display / manual browser flow

Resolved 💬 3 comments Opened Mar 23, 2026 by Frank-Schruefer Closed Mar 27, 2026

Environment

  • Claude Code 2.1.74
  • Linux, headless / no X display, different user context (no automatic browser opening)

Bug 1: Auth URL contains line breaks and extra whitespace

When no browser opens automatically and the auth URL is displayed in the terminal, manually selecting and copying the URL (via mouse) includes embedded newlines and spaces. The user has to manually clean the URL before it works in a browser.

Expected: URL is displayed on a single line, or at minimum can be cleanly selected/copied without picking up whitespace artifacts.

Bug 2: Verification code "Copy" button silently fails

After completing browser auth, the page shows a verification code with a button that reports "Copied" after clicking. However, the clipboard write actually fails (likely navigator.clipboard.writeText() rejected due to missing permissions/context), while the UI incorrectly shows success feedback. The clipboard still contains whatever was there before.

Workaround: Manually select the code and press Ctrl+C.

Expected: Either the copy succeeds, or the UI shows the actual error state instead of false success.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗