[BUG] claude auth login fails with socket closed unexpectedly after password change
Resolved 💬 2 comments Opened Apr 25, 2026 by Boneandear44 Closed Apr 26, 2026
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?
Version: 2.1.119
OS: macOS arm64 (Apple Silicon)
Error: Login failed: The socket connection was closed unexpectedly
Triggered by: Changed claude.ai password
Network diagnostics all pass:
- curl -I https://api.anthropic.com/v1/messages returns HTTP/2 405 (correct)
- TLS 1.3 handshake succeeds
- No proxy, no VPN, no firewall
Telemetry shows tengu_oauth_token_refresh_failure on every startup.
Clean reinstall of claude-code does not help.
rm -rf ~/.claude and reinstall does not help.
Issue persists for 8+ hours.
What Should Happen?
claude auth login should complete successfully and save credentials so Claude Code can connect to the API.
Error Messages/Logs
Steps to Reproduce
- Change claude.ai account password (login via gmail).
- Run: claude auth login
- Browser opens, click Authorize
- Browser shows "You're all set up for Claude Code"
- Terminal shows: Login failed: The socket connection was closed unexpectedly
- Claude Code is completely unusable - every startup shows tengu_oauth_token_refresh_failure
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code v2.1.119
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗