[BUG] VS Code Extension Session Terminated Unexpectedly and Prompts for Login
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?
While actively using the Claude Code VS Code extension, my session was abruptly terminated without any warning or clear error message. The extension's UI reset and displayed the "OAuth token revoked · Please run /login" message, forcing me to log in again. This happened in the middle of a task, interrupting my workflow.
What Should Happen?
The session should remain active as long as I am using the extension. If a session must be terminated (e.g., due to an expired OAuth token, network issue, or server-side problem), the extension should display a clear and user-friendly notification explaining the reason for the disconnection, rather than silently reverting to the login screen.
Error Messages/Logs
The only message displayed in the extension panel was:
OAuth token revoked · Please run /login
Steps to Reproduce
It is difficult to provide exact steps as the issue occurred spontaneously during a work session. However, the general scenario was:
- Install and log in to the Claude Code VS Code extension on macOS.
- Start a new session and begin interacting with Claude Code on a task within a project directory.
- Continue working for some period of time.
- Observe that the extension UI suddenly resets, the conversation history disappears, and the login prompt is displayed.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.1
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
- IDE: Visual Studio Code
- OS: macOS
- I was in the middle of a complex task, verifying a web scraping system, when the session terminated.
- This feels like a silent failure, possibly due to an OAuth token expiring in the background without a proper refresh attempt or user notification.
- Please see the attached screenshot which shows the state of the extension after the session was terminated.
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗