[BUG] Claude Code CLI/VS Code — repeated connection timeouts followed by OAuth token expiry, forces re-login every few minutes

Resolved 💬 3 comments Opened Mar 20, 2026 by luciche Closed Mar 23, 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?

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

  1. Open VS Code with Claude Code
  2. Run /login and authenticate
  3. Start any task
  4. After 1-2 minutes: timeout loop → connection error → 401 OAuth expired
  5. 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗