anthropics / anthropics/claude-code
[BUG] Windows CLI Auth Error - OAuth Session Expires Before Code Can Be Pasted
- Lingua principale
- Python
- Stelle
- 145k
- Fork
- 23.1k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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 in my local file and I tried to log in to Claude. I have already updated the versions and done .gitignore. But when I log in, Claude goes to Chrome and I authorize it. However, before and after I copy the Authentication Code, it displays an "Auth Error" which is why I can't paste the code there. Sometimes I am able to paste it quickly, but it still throws an "Auth Error" anyway.
### What Should Happen?
Login Successfully!
### Error Messages/Logs
```shell
Auth error.
```
### Steps to Reproduce
1. In a native Windows project directory, run claude auth login.
2. Chrome opens; successfully log into Claude Pro and hit Authorize.
3. Observe that PowerShell has already crashed with an Auth Error before or during the exact moment you copy-paste the verification code.
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
v2.1.261
### Claude Code Version
v2.1.260 (Claude Code)
### Platform
Anthropic API
### Operating System
Windows
### Terminal/Shell
PowerShell
### Additional Information
_No response_
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Reproduce on native Windows in PowerShell by running `claude auth login` and completing the browser authorization flow. Start by finding the CLI auth login/OAuth callback handling and any Windows-specific process or timeout behavior. Done means the code can be pasted and login completes successfully instead of showing `Auth error.`
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, python
- Ambito
- authentication, cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100