[BUG] VS Code extension logs out after idle/overnight, requires full re-login despite being logged in on claude.ai
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 the VS Code extension logs out automatically after some time (appears to happen after leaving VS Code idle or overnight). When I reopen VS Code, the extension shows the login screen again and asks me to log in from scratch.
This happens even though I am already logged into claude.ai in Chrome with the same account. The extension does not stay authenticated, and I have to repeat the full OAuth login flow every time this happens.
What Should Happen?
Claude Code should stay logged in and silently refresh the session/token in the background, without requiring me to manually log in again each time. Being logged into claude.ai in the browser should not be required separately — the extension's own saved login should persist across restarts and idle periods.
Error Messages/Logs
Steps to Reproduce
- Log in to Claude Code in the VS Code extension
- Use it normally, then close VS Code or leave it idle for a few hours / overnight
- Reopen VS Code
- The Claude Code panel shows the login screen again instead of staying authenticated
- Have to complete the full login flow again to continue
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.258
Platform
Other
Operating System
Windows
Terminal/Shell
Cursor
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗