[BUG] login with pasting auth code doesn't work

Resolved 💬 47 comments Opened Apr 13, 2026 by shykwon Closed Apr 16, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

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

What's Wrong?

I am running claude in an SSH terminal, and I cannot paste the authentication code into the 'Paste code here' prompt. Ctrl+V (or Cmd+V) does not work. I have tried right-clicking, but it still fails.

What Should Happen?

I am running claude in an SSH terminal, and I cannot paste the authentication code into the 'Paste code here' prompt. Ctrl+V (or Cmd+V) does not work. I have tried right-clicking, but it still fails.

Error Messages/Logs

.

Steps to Reproduce

-> /login
-> copy code
-> paste it

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.105

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

47 Comments

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/47648
  2. https://github.com/anthropics/claude-code/issues/47670
  3. https://github.com/anthropics/claude-code/issues/44136

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

ryan-at-ico · 3 months ago

I got around it by using this in a PowerShell window (replace your-code-here with the code from the browser, then quickly click back on the WSL terminal window):

Start-Sleep -Seconds 3; Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait("your-code-here")
shykwon · 3 months ago
I got around it by using this in a PowerShell window (replace your-code-here with the code from the browser, then quickly click back on the WSL terminal window): `` Start-Sleep -Seconds 3; Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait("your-code-here") ``

you are genius

Cassiiopeia · 3 months ago

I’m also hitting this on Claude Code 2.1.105, and in my case it is not only a paste problem.

The login prompt itself gets interrupted while I am entering the auth code.

What happens:

  • run /login
  • start entering the auth code
  • before finishing, the prompt suddenly exits with Login interrupted
  • after that, the auth code ends up in the normal prompt instead of the login prompt

What I already tried:

  • normal paste
  • PowerShell SendKeys with the full code at once
  • PowerShell SendKeys character-by-character with a short delay between characters
  • sending {ENTER} separately after the code was entered

Example of what I tried in PowerShell:

  • Start-Sleep -Seconds 5; Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait("...code...")
  • character-by-character:
  • Add-Type -AssemblyName System.Windows.Forms
  • $code = "...code..."
  • Start-Sleep -Seconds 5
  • foreach ($ch in $code.ToCharArray()) { [System.Windows.Forms.SendKeys]::SendWait($ch); Start-Sleep -Milliseconds 25 }
  • [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")

So on my side this is not just clipboard paste failing — the login input session itself is being terminated mid-input.

JoshFinlayAU · 3 months ago

Seeing the same issue here too on MacOS. Able to type in the field but cannot paste.

chunpaiyang · 3 months ago

Seeing the same issue here too on Ubuntu.
(Linux vbm 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux)
Able to type in the field but cannot paste.

Workaround for login if your are using tmux:
tmux send-keys -t vwt-ssd:5 'claude' C-m
... some operation and url pop-up ....
... use url get the auth code ...
tmux send-keys -t vwt-ssd:5 'the auth code' C-m

Hope this helps !

JoshFinlayAU · 3 months ago

Solved by rolling back to an earlier version -

curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89

rebekah · 3 months ago
Solved by rolling back to an earlier version - curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89

thanks, that worked for me :)

mike-callahan · 3 months ago

Also running into this. Rollback suggested by @JoshFinlayAU worked for me!

madbrain76 · 3 months ago

Same issue on Raspberry PI OS - can't paste

mafshin · 3 months ago

Same issue on Ubuntu, unable to login

radzag7127 · 3 months ago
I got around it by using this in a PowerShell window (replace your-code-here with the code from the browser, then quickly click back on the WSL terminal window): `` Start-Sleep -Seconds 3; Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait("your-code-here") ``

THANK YOU!

jmaddington · 3 months ago

2.1.107, same problem. Rollback worked.

...but how did this ever rollout??

Merodami · 3 months ago

Same issue, it seems is globally

dlxmax · 3 months ago

Why do I feel like this isn't a bug but more hostility from Anthropic against users?
I have two Pro accounts. I don't need Pro Max. Is this designed to force me to upgrade?

I tried many ideas found in the bug reports, but only this one worked for me: claude install 2.1.104

kamaradski · 3 months ago

same both on MacOS, and in my debian based devcontainers. rollback is the only possible solution so far, tried every trick in the book no luck

sr-kristiansen · 3 months ago
Why do I feel like this isn't a bug but more hostility from Anthropic against users? I have two Pro accounts. I don't need Pro Max. Is this designed to force me to upgrade? I tried many ideas found in the bug reports, but only this one worked for me: claude install 2.1.104

I have Enterprise account, what exactly should I upgrade to? No, this is not hostility but a stupid bug.

The rollback to 2.1.89 solved it for me:

curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89

beyond2060 · 3 months ago

Fixed by rollback.
There should be a stable version that is a few days behind the bleeding edge version. I shouldn't have to waste time with this kind of thing. Wasted a lot of time on this.

elucidsoft · 3 months ago

Same issue for me, had to downgrade to 104

aktasberkin · 3 months ago

same issue here

ansonne · 3 months ago

If you’re running WSL, this workaround should get you sorted:

Execute these commands in your WSL terminal:

sudo apt update && sudo apt install -y wslu
echo 'export BROWSER=wslview' >> ~/.bashrc
source ~/.bashrc
claude
/login

Note: On legacy Ubuntu versions, you’ll need to run sudo add-apt-repository ppa:wslutilities/wslu before installing.

Credits: JonaPlaz

aarisr · 3 months ago

same

gabrielctn · 3 months ago

Same, rolling back to 104 worked

curl -fsSL https://claude.ai/install.sh | bash -s 2.1.104
anajuliabit · 3 months ago

same issue

FreyRaumUG · 3 months ago

same here

junzhengca · 3 months ago

+1 same issue, seems to be cross-platform, can reproduce on macOS, WSL + Windows Terminal, and powershell. 2.1.89 works.

rekon307 · 3 months ago

lol claude code is really becoming a joke at this point

chase1124 · 3 months ago

what's even more amazing is that every time you logout you have to re-install the old version again because it automatically updates back to the broken version.

aarisr · 3 months ago

is this a bug or is this enshittification at play?

flawlesscode254 · 3 months ago

am on Arch linux and facing the same issue

Chaysen · 3 months ago

Same issue here

pandey-adarsh147 · 3 months ago

curl -fsSL https://claude.ai/install.sh | bash -s 2.1.101

last stable version

kadamgreene · 3 months ago

I also found an issue, that if you try to paste back the key manually, that if the key contains n, it will immediately cancel the login (even typing a single n in the prompt will cancel it)

seansusmilch · 3 months ago

I was able to rollback using claude codes build in installer

# 1. Roll back to stable
claude install stable

# 2. Log in like usual with /login

# 3. Go back to latest
claude install latest
waterimp · 3 months ago

Running Ubuntu 24.04 in a docker container. Pasting was broken. Rolling back to 2.1.101 fixed my problem.

npm install -g @anthropic-ai/claude-code@2.1.101
swaminator · 3 months ago

Same issue here on MacOS

chz34 · 3 months ago

Same issues in wsl. Can't paste. Tyring to type the code, got interrupted.

LiuXiao-Rucile · 3 months ago

Same issue in x86 linux

attilaveres · 3 months ago
I also found an issue, that if you try to paste back the key manually, that if the key contains n, it will immediately cancel the login (even typing a single n in the prompt will cancel it)

if you can confirm this, absolutely open a bug ticket for it, and not leave here as a comment cause they will never know about it.

SudeepMalipeddi · 3 months ago
I was able to rollback using claude codes build in installer # 1. Roll back to stable claude install stable # 2. Log in like usual with /login # 3. Go back to latest claude install latest

I used this and it works

ktiedt · 3 months ago

This is a ridiculous bug, but it seems (at least on Windows) I was able to get this to work by copying the code, going back to the HA window, clicking to focus, just to be sure, and then using ctrl+shift+v to paste

ozzman530i · 3 months ago

Try shift+insert instead of strg+v! worked for me

ozzman530i · 3 months ago

BTW: Claude Chat found the way: Echte Lösung: Der Login-Flow erzeugt eine URL. Du öffnest sie im Browser, bekommst den Code — und kannst ihn direkt per WSL-Clipboard reinschreiben:
bash# In WSL, wenn du beim Code-Prompt bist:

Einfach den Code in die WSL-Zwischenablage legen und mit Shift+Insert einfügen

Shift+Insert statt Ctrl+V — das ist der klassische Linux-Paste-Shortcut im Terminal. Hast du das schon probiert?

ashwin-ant collaborator · 3 months ago

This is a duplicate of #47699, which was fixed as of version 2.1.108.

---
_Generated by Claude Code_

jmaddington · 3 months ago

What? You’re closing it as a duplicate of itself?

<img width="1125" height="425" alt="Image" src="https://github.com/user-attachments/assets/74c2f16e-97c5-4c4b-91e1-1f38127389a5" />

ashwin-ant collaborator · 3 months ago

@jmaddington This is #47669, that's #47699 😄

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.