claude-code - 💡(How to fix) Fix Claude Code OAuth flow broken over SSH — cannot paste auth code [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48048Fetched 2026-04-15 06:34:47
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3subscribed ×2commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When authenticating Claude Code via /login in a terminal connected to a remote machine over SSH, the browser opens the auth URL correctly and generates a one-time code. However, the "click to copy" button on the auth page fails silently in Chrome — clicking it does not copy the code to clipboard. Manual text selection of the code is also not possible as the text is not selectable. There is no fallback to type the code in manually. This makes it impossible to complete authentication over SSH without an API key, which incurs separate billing outside the Claude.ai subscription. This appears to be a recent regression as the flow was working previously. Environment: Claude Code over SSH, remote Ubuntu 24.04 LTS, Chrome browser on local machine, Tailscale mesh network.

What Should Happen?

Should copy

Error Messages/Logs

Steps to Reproduce

Steps to reproduce: SSH into a remote machine (Ubuntu 24.04 LTS) from a local machine Run claude or /login in the remote terminal Claude Code generates a browser auth URL — copy and open in Chrome on the local machine Auth page loads and displays a one-time code Click the "click to copy" button on the auth page — nothing is copied to clipboard Attempt to manually select the code text — text is not selectable Attempt to type the code manually into the terminal — no input field accepts it Authentication cannot be completed Expected behaviour: Clicking the copy button copies the code, which can then be pasted into the remote terminal to complete authentication. Actual behaviour: Copy button fails silently, text is unselectable, no manual entry fallback exists. Authentication is impossible without bypassing to API key billing.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude code V2.1.107

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

PowerShell

Additional Information

No response

extent analysis

TL;DR

The "click to copy" button on the Claude Code auth page fails to copy the one-time code to the clipboard in Chrome, likely due to a recent regression.

Guidance

  • Investigate the browser's clipboard permissions and settings to ensure that Chrome is allowed to access the clipboard.
  • Check for any recent updates or changes to the Claude Code authentication flow that may have introduced this regression.
  • Consider testing the authentication flow in a different browser to determine if the issue is specific to Chrome.
  • Review the Claude Code documentation to see if there are any known issues or workarounds for this problem.

Example

No code snippet is provided as the issue is related to a specific authentication flow and browser interaction.

Notes

The issue may be specific to the Chrome browser or the Tailscale mesh network configuration. Further investigation is needed to determine the root cause of the regression.

Recommendation

Apply workaround: Test the authentication flow in a different browser or investigate alternative methods for copying the one-time code, such as using a different device or browser extension, until the regression is fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING