Bug: Cannot paste OAuth code into Claude Code auth prompt
Environment:
- Claude Code CLI (latest as of 2026-04-14)
- Tested on: Kitty 0.46.2, Emacs Eat terminal
- OS: Arch Linux x86_64, kernel 6.19.10, i3wm, X11
What happened:
Claude Code was working fine ~8 hours ago. Went to sleep, did not update the system (no pacman upgrades overnight, verified via /var/log/pacman.log). Woke up, reconnected to an SSH server (office-jump) where a Claude Code session needed re-authentication. Could not paste the OAuth code into the Eat terminal auth prompt. Switched to a Kitty terminal and tried middle-mouse-button paste -- also failed. Typing characters works fine at the same prompt; only paste is broken.
This was working earlier the same day with the same setup.
Steps to reproduce:
- Run
claude or claude auth login when authentication is needed
- Browser opens, authenticate, copy the OAuth code
- Return to terminal, attempt to paste the code (Ctrl+Shift+V in Kitty, or middle-click for X11 primary selection, or C-y / M-x clipboard-yank in Emacs Eat)
Expected: Code is pasted into the prompt
Actual: Nothing appears. No error, no text. The prompt remains empty as if no paste occurred.
Verification that clipboard works:
xclip -selection clipboard -o returns the correct OAuth code
xclip -selection primary -o also returns the code
- Paste works normally in every other application and prompt
- Only the Claude Code OAuth input prompt is affected
Details:
- Typing the code character by character WORKS at the same prompt
- Tested in two independent terminal emulators (Kitty 0.46.2 and Emacs Eat) -- same failure in both
- No system updates between working and broken states
- The Claude Code process itself was restarted (new session, not a stale process)
Likely cause:
The OAuth code input prompt may not handle bracketed paste mode. Modern terminals wrap pasted content in ESC[200~ / ESC[201~ escape sequences. If the prompt reads stdin in raw mode without interpreting these sequences, the pasted text is silently dropped while typed characters pass through fine.
Workarounds found:
- Authenticate on another machine and copy
~/.claude/.credentials.json to the target machine
- Pipe the code:
echo 'CODE' | claude auth login (accepts the code via stdin)
Bug: Cannot paste OAuth code into Claude Code auth prompt
Environment:
What happened:
Claude Code was working fine ~8 hours ago. Went to sleep, did not update the system (no pacman upgrades overnight, verified via /var/log/pacman.log). Woke up, reconnected to an SSH server (office-jump) where a Claude Code session needed re-authentication. Could not paste the OAuth code into the Eat terminal auth prompt. Switched to a Kitty terminal and tried middle-mouse-button paste -- also failed. Typing characters works fine at the same prompt; only paste is broken.
This was working earlier the same day with the same setup.
Steps to reproduce:
claudeorclaude auth loginwhen authentication is neededExpected: Code is pasted into the prompt
Actual: Nothing appears. No error, no text. The prompt remains empty as if no paste occurred.
Verification that clipboard works:
xclip -selection clipboard -oreturns the correct OAuth codexclip -selection primary -oalso returns the codeDetails:
Likely cause:
The OAuth code input prompt may not handle bracketed paste mode. Modern terminals wrap pasted content in
ESC[200~/ESC[201~escape sequences. If the prompt reads stdin in raw mode without interpreting these sequences, the pasted text is silently dropped while typed characters pass through fine.Workarounds found:
~/.claude/.credentials.jsonto the target machineecho 'CODE' | claude auth login(accepts the code via stdin)