[BUG] Can't paste auth token into the CLI app, so can't auth.

Resolved 💬 18 comments Opened Apr 13, 2026 by hank Closed Apr 15, 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?

/login
copy url
paste in browser
Authorize
Get code to paste
Can't paste. Tried on 2 different machines, both of which were working before for this process.
Nothing occurs on screen when I try to paste. I can switch to another tmux pane and paste. I can paste in the CLI without running claude, and I can even paste into the claude normal prompt, just not the code I get from the SSO final page.

What Should Happen?

Pastes the code and lets me auth.

Error Messages/Logs

Steps to Reproduce

/login
copy url
paste in browser
Authorize
Get code to paste
Can't paste. Tried on 2 different machines, both of which were working before for this process.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.105

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Using Gnome-Terminal and Tabby has the same behavior.

View original on GitHub ↗

18 Comments

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/41485
  2. https://github.com/anthropics/claude-code/issues/44136
  3. https://github.com/anthropics/claude-code/issues/39764

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

jrmougan · 3 months ago

same here, on WSL

koznov · 3 months ago

Same issue with WSL.

Jungal10 · 3 months ago

Same here!

mickaeldanslenowhere · 3 months ago

Trick is to connect on a device that have the access to a browser and then copy credentials.json into the one that can't connect

You can even ask Claude to do it for you if you have access through ssh

jalalkun · 3 months ago

same here in ubuntu

dwawer-pretius · 3 months ago

Same here, WSL + ubuntu. Overall paste works, but not for the token prompt after /login.

fedetask · 3 months ago

Same here with WSL2 + Ubuntu. This blocks the usage completely.

QtMas · 3 months ago

I had the same problem on Ubuntu's Gnome-Terminal and Ghostty with Claude Code version 2.1.107. I reverted to version 2.1.104 and I was able to paste my token normally.

claude install 2.1.104
Logorrheique · 3 months ago

Same WSL

RollieHudson · 3 months ago

claude install 2.1.104 - that worked for me. I'm back into Claude now. Thanks!

fillphree · 3 months ago

Also, ran into this. Debian Linux, bash, Claude Code 2.1.107. Cannot paste Auth code into the terminal window. Reverted back to 2.1.104 as mentioned above, and this was a valid work around.

Eamll · 3 months ago

Yes, going to 2.1.104 is a valid workaround.

donbeave · 3 months ago

Root cause isolation: bug is in ink's input layer, not in Docker/SSH/terminal/Node.js

I spent several hours systematically isolating this. Sharing the results since none of the duplicate issues have identified exactly where the bug lives.

Layer-by-layer test (inside docker run -ti debian:latest)

| Layer | Paste works? |
|---|---|
| bash / read -r inside Docker | Yes |
| cat inside Docker | Yes |
| Bracketed paste sequences (\e[200~...\e[201~) through Docker PTY | Yes |
| Node.js process.stdin.setRawMode(true) + on('data') inside Docker | Yes |
| Claude Code inside Docker | No |
| Claude Code on host (macOS) | N/A — browser auto-authenticates, paste not needed |

Node.js raw stdin proof

// /tmp/t.js — run inside the container
process.stdin.setRawMode(true);
process.stdin.resume();
process.stdin.on("data", d => {
  process.stdout.write("got " + d.length + " bytes\n");
  if (d[0] === 3) process.exit();
});

Pasting a 24-character string → got 24 bytes. Node.js receives the paste data correctly through Docker's PTY. The data is lost somewhere between process.stdin and ink's input handler.

What was ruled out

  • Bracketed paste mode — Docker PTY correctly forwards \e[200~...\e[201~ (verified with printf "\e[?2004h"; cat)
  • TERM value — tested xterm, xterm-256color, xterm-ghostty
  • Terminal emulator — reproduces in Ghostty, iTerm2, and Terminal.app (macOS)
  • Docker detach keys — tested with --detach-keys=""
  • CLAUDE_CODE_NO_FLICKER — no effect
  • Container entrypoint / shell config — reproduces with docker exec bypassing everything
  • Docker itselfdocker run -it debian bash handles paste fine

Minimal Docker reproduction

docker run -ti debian:latest bash
apt-get update && apt-get install -y curl
curl -fsSL https://claude.ai/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
claude
# Paste anything at the OAuth prompt → nothing appears

Regression data from duplicate issues

Multiple reporters have narrowed the regression window:

  • #47725: worked in 2.1.104, broken in 2.1.105
  • #47699: worked in 2.1.101, broken in 2.1.105
  • #39764: worked in 2.1.81, broken in 2.1.84
  • #47863: worked in 2.0.61, broken in 2.1.107
  • #16753: worked in 2.0.76, broken in 2.1.0 (earlier occurrence, was fixed, now regressed again)

Duplicate issues (all the same root cause)

  • #47669 — login with pasting auth code doesn't work
  • #47670 — CLI login fails when terminal paste bracketing is enabled
  • #47699 — cannot paste in Dev Container (closed as dup)
  • #47725 — WSL2 paste broken at OAuth prompt (regression from 2.1.104)
  • #47728 — login prompt doesn't accept paste on Linux/Ubuntu
  • #47745 — cannot paste OAuth code (bracketed paste not handled)
  • #47863 — paste broken in Windows Terminal + SSH
SpecialEdCT · 3 months ago

about 12 hours ago all of my Claude Code sessions stopped working, so I gave up using it. A few hours later I found this thread and I was running 2.1.104 which fixed the issue, until recently when I opened a new shell and found it doesn't work.

Turns out Claude Code auto updated itself. So since Anthropic clearly doesn't test their code before they ship it I'm gonna make the call that its best to not update the Claude Code scripts. I was able to do this across all of my servers by running: DISABLE_AUTOUPDATER=1

SpecialEdCT · 3 months ago

looks like Anthropic is only making the problem worse now, neither v2.1.108 or v2.1.104 allow authentication. Nothing like paying $200 a month for a product that won't let you use it.

 ▐▛███▜▌   Claude Code v2.1.108                                                                                                                                                                                   
▝▜█████▛▘  Sonnet 4.6 · Claude API                                                                                                                                                                                
  ▘▘ ▝▝    /root     

❯ /login                                                                                                                                                                                                          
  ⎿  Login successful
                                                                                                                                                                                                                  
❯ hi                                                                                                                                                                                                              
  ⎿  Please run /login · API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid bearer token"},"request_id":"req_011Ca4b3xL5yBgbzcc2q8EsT"}                                     
                                                                                                                                                                                                                  

 ▐▛███▜▌   Claude Code v2.1.104
▝▜█████▛▘  Sonnet 4.6 · Claude API                                                                                                                                                                                
  ▘▘ ▝▝    /root     

❯ hi                                                                                                                                                                                                              
  ⎿  Please run /login · API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid bearer token"},"request_id":"req_011Ca4aTBbpyAv2eSfVPd48a"}
                                                                                                                                                                                                                  
❯ /login                                                                                                                                                                                                          
  ⎿  Login successful                                                                                                                                                                                             
                                                                                                                                                                                                                  
❯ hi                                                                                                                                                                                                              
  ⎿  Please run /login · API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid bearer token"},"request_id":"req_011Ca4aUti8uy3Pjwns7NhZ1"}              
ashwin-ant collaborator · 3 months ago

Duplicate of #47669 — same bug: paste into the /login "Paste code here" prompt is silently rejected (likely bracketed-paste handling). Closing in favor of that issue; please subscribe there for updates.

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.