[BUG] VS Code extension keeps getting logged out when the Claude desktop app is also signed in (shared credentials on Windows)
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?
Title: VS Code extension keeps getting logged out when the Claude desktop app is also signed in (shared credentials on Windows)
Environment:
- Windows 10 Pro (10.0.19045)
- Claude Code VS Code extension 2.1.300
- Claude desktop app (Code tab) running at the same time
Expected:
The desktop app and the VS Code extension should not overwrite or clear each other's login,
or they should share it safely.
Workaround:
Launch VS Code with CLAUDE_CONFIG_DIR pointing to a separate folder, so the extension uses its own credential store.
What Should Happen?
What happens:
The VS Code extension repeatedly loses its login. The extension log shows this line roughly every 3 minutes:
"The signed-in account changed outside this window (another account signed in); refreshing every webview"
followed later by "[Bootstrap] Skipped: no usable OAuth, WIF, or API key".
Afterwards ~/.claude/.credentials.json has an empty accessToken/refreshToken and expiresAt = 0.
Additional finding: logouts line up with network drops. I use Proton VPN with the advanced (permanent) kill switch.
The credentials file was wiped at 10:01:07 and the VPN reported 'ServerUnreachable' at 10:02:05.
Yesterday the login was lost during VPN outages at 16:14–16:27 and 21:56–21:59 (PingTimeoutError).
A dropped connection during token refresh seems to leave the client without a valid token, which signs it out.
Error Messages/Logs
Steps to Reproduce
Launch VS Code with CLAUDE_CONFIG_DIR pointing to a separate folder, so the extension uses its own credential store.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.300
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Additional finding: logouts line up with network drops. I use Proton VPN with the advanced (permanent) kill switch.
The credentials file was wiped at 10:01:07 and the VPN reported 'ServerUnreachable' at 10:02:05.
Yesterday the login was lost during VPN outages at 16:14–16:27 and 21:56–21:59 (PingTimeoutError).
A dropped connection during token refresh seems to leave the client without a valid token, which signs it out.
_No response_