[BUG] Windows: /login authorization-code prompt accepts no input (type or paste) while the main REPL composer works — interactive login impossible
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?
On Windows, /login opens the browser, I approve access, and Claude Code returns to the terminal asking me to paste the authorization code. That code-entry prompt
accepts no keyboard input — I can neither paste it (right-click, Ctrl+Shift+V, Ctrl+V all do nothing) nor type the characters manually. Nothing appears and nothing
can be submitted, so interactive login can never complete.
Importantly, this is not a global "stdin never reaches the process" problem: the main REPL composer accepts typing and paste normally. It is specifically the
modal authorization-code input that receives nothing — which suggests the modal text-input component uses a different input path than the main composer.
### Environment
- Claude Code: v2.1.191
- Plan / model: Claude Max, Opus 4.8 (1M context)
- OS: Windows 11, build
10.0.26200.8655 - Install method: native standalone binary (
%USERPROFILE%\.local\bin\claude.exe), not the npm package — input handling can differ between the bundled-Node
binary and a system-Node npm install, so this may matter for reproduction.
- Terminals tried (identical failure in all): Windows Console Host (CMD), PowerShell, Windows Terminal.
What Should Happen?
The pasted/typed code appears in the modal prompt and can be submitted to finish login.
Error Messages/Logs
Steps to Reproduce
- On Windows (native standalone binary install), run
claudeand trigger/login. - Complete the browser OAuth approval.
- Back in the terminal, reach the "paste your authorization code" modal prompt.
- Attempt to paste or type the code.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.191 (Claude Code)2
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
The modal prompt registers no input at all (typed or pasted); the code cannot be entered or submitted, and login cannot complete via the interactive flow.
### Scope / what was ruled out
- Multiple terminals (CMD, PowerShell, Windows Terminal) — identical behavior.
- All paste methods (right-click, Ctrl+Shift+V, Ctrl+V) and manual typing — none register.
- The main REPL composer is unaffected (typing and paste work there), so the defect is isolated to the modal authorization-code input, not the app's input handling
as a whole.
### Workaround (confirms it's input-handling, not auth)
then starts authenticated with no input required.
This is effectively permanent, not a one-shot: the credentials file contains a refreshToken (not just the short-lived accessToken), so Claude Code refreshes
silently and never returns to the broken modal. You only need to repeat it if the refresh token is revoked (explicit /logout, password change, or a revoked session).
This confirms the auth/token path itself is fine — the defect is purely that the modal code prompt never receives input.
A PowerShell helper that validates the source actually carries a refresh token (a copy without one will strand you), backs up the current creds, then installs:
```powershell
param([Parameter(Mandatory)][string]$Source)
$ErrorActionPreference = 'Stop'
$dest = Join-Path $env:USERPROFILE '.claude\.credentials.json'
New-Item -ItemType Directory -Force (Split-Path $dest) | Out-Null
$o = (Get-Content $Source -Raw | ConvertFrom-Json).claudeAiOauth
if (-not $o.refreshToken) { throw "Source has no refreshToken; it will expire and strand you." }
if (Test-Path $dest) { Copy-Item $dest "$dest.bak-$(Get-Date -f yyyyMMdd-HHmmss)" -Force }
Copy-Item $Source $dest -Force
Write-Host "Restored ($($o.subscriptionType)). Access token refreshes silently from here. Start a fresh 'claude' session." -ForegroundColor Green
Run as .\Restore-ClaudeCreds.ps1 -Source "\\path\to\known-good\.credentials.json", copying from any already-authenticated machine.
Impact
A fresh interactive /login is impossible on the affected Windows setup. Users without a second authenticated machine to copy credentials from would be fully blocked
from signing in.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗