claude-code - 💡(How to fix) Fix /login OAuth flow: unable to paste code in WSL2 terminal [2 comments, 3 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#47960Fetched 2026-04-15 06:37:24
View on GitHub
Comments
2
Participants
3
Timeline
10
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2subscribed ×2closed ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

Additional Notes

  • Paste works normally in WSL2 terminal outside of the /login flow
  • This started after a recent Claude Code update
  • Workaround: using API Key directly (loses Claude Max subscription benefits)
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?

Bug Description

When running claude /login in WSL2, the terminal enters an interactive mode that blocks paste operations. The code generated by the OAuth flow in the browser cannot be pasted back into the terminal.

Environment

  • OS: Windows 11
  • Shell: WSL2 (Ubuntu)
  • Claude Code version: 2.1.107
  • Terminal: Windows Terminal / PowerShell / cmd.exe

What Should Happen?

The code should be pasteable into the terminal to complete authentication.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Run claude /login inside WSL2
  2. Open the generated URL in browser
  3. Authenticate successfully
  4. Try to paste the generated code back into the terminal
  5. Paste fails (Ctrl+V, Ctrl+Shift+V, right-click, Shift+Insert — all fail)

Additional Notes

  • Paste works normally in WSL2 terminal outside of the /login flow
  • This started after a recent Claude Code update
  • Workaround: using API Key directly (loses Claude Max subscription benefits)

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.107 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

No response

extent analysis

TL;DR

The issue can likely be resolved by configuring the WSL2 terminal to allow paste operations during the Claude Code login flow.

Guidance

  • Investigate the terminal settings in WSL2 to see if there's an option to enable paste operations in interactive modes.
  • Check if there are any specific keyboard shortcuts or settings in Windows Terminal, PowerShell, or cmd.exe that can be used to enable paste operations.
  • Consider using a different terminal emulator that supports paste operations in interactive modes.
  • Look into the Claude Code documentation to see if there are any known issues or workarounds for this problem.

Example

No code snippet is provided as it's not clearly supported by the issue.

Notes

The issue seems to be specific to the WSL2 environment and the Claude Code login flow. The fact that paste operations work normally outside of the login flow suggests that the issue is not with the terminal itself, but rather with the way Claude Code interacts with the terminal during the login process.

Recommendation

Apply workaround: Use a different terminal emulator or configure the existing terminal to allow paste operations, as the issue is likely related to the terminal settings rather than a bug in Claude Code.

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