[BUG] Claude Code CLI/VS Code — repeated connection timeouts followed by OAuth token expiry, forces re-login every few minutes
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?
Claude Code in VS Code disconnects repeatedly after working perfectly for weeks with zero changes on my end. The failure pattern is always identical:
Step 1 — Timeout loop:
Request timed out. Check your internet connection and proxy settings
Retrying in 11 seconds… (attempt 10/10)
Step 2 — Connection error:
API Error: Connection error.
Step 3 — Auth failure:
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CZCvfZGnSutP4tpmLCqXM"}
Please run /login
After re-authenticating via /login, it works for 1-2 minutes, then the exact same cycle repeats indefinitely.
Note: Related Issue
This bug is occurring simultaneously with a second issue I'm reporting separately: blank screen / no response in the Claude Code Mac Desktop App. Both issues started at the same time on March 19, 2026, suggesting a shared infrastructure cause.
What Should Happen?
Claude Code should maintain a stable connection and not require re-authentication every few minutes.
Error Messages/Logs
⎿ Request timed out. Check your internet connection and proxy settings
Retrying in 11 seconds… (attempt 10/10)
⎿ API Error: Connection error.
⎿ API Error: 401 {"type":"error","error":{"type":"authentication_error",
"message":"OAuth token has expired. Please obtain a new token or refresh
your existing token."},"request_id":"req_011CZCvfZGnSutP4tpmLCqXM"}
· Please run /login
Steps to Reproduce
- Open VS Code with Claude Code
- Run /login and authenticate
- Start any task
- After 1-2 minutes: timeout loop → connection error → 401 OAuth expired
- Run /login again → works briefly → repeats from step 4
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
1.1.7714 (3bd6f6)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment
- Claude Code Version: 1.1.7714 (3bd6f6)
- Operating System: macOS 26.3.1
- Hardware: Apple M4
- Platform: Anthropic API
- No proxy, no VPN
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗