VS Code extension: OAuth session disconnects 1-4 times daily, requires re-login
Resolved 💬 3 comments Opened Mar 29, 2026 by voyagi Closed Apr 1, 2026
Description
The Claude Code VS Code extension intermittently loses its authenticated session, forcing a manual re-login. This happens approximately 1-4 times per day during normal usage.
Environment
- OS: Windows 11 Pro 10.0.26200
- VS Code: latest stable
- Claude Code extension: latest
- Plan: Max (Opus 4.6 1M context)
Behavior
- Mid-session, the extension suddenly reports being disconnected/unauthenticated
- No user action triggers it (not closing windows, not switching networks)
- Requires clicking through the login flow again to restore the session
- After re-login, everything works normally until the next disconnect
- Frequency: 1-4 times per day, seemingly random timing
Possible factors
- Multiple VS Code windows may be open concurrently
- Long sessions with auto-compaction enabled
- OAuth token refresh may be silently failing instead of renewing
Expected behavior
The session should remain authenticated throughout the day without requiring manual re-login, with token refresh happening transparently in the background.
Steps to reproduce
- Log into Claude Code via VS Code extension
- Use normally throughout the day
- At some point (30min - several hours), the session disconnects without warning
- Must re-authenticate to continue
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗