[BUG] VS Code Developer Tools Window Reload crashes Claude Code session
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?
When using VS Code's Developer Tools Window Reload (Ctrl+Shift+P → "Developer: Reload Window" or Ctrl+R in Developer Tools panel), the Claude Code session crashes immediately. The entire conversation context is lost and the session ends abruptly.
This is distinct from the auto-update crash (#13130) as it occurs with intentional window reloads, not auto-updates.
What Should Happen?
- Claude Code should detect window reload is imminent and gracefully pause/persist state
- After reload completes, Claude Code should reconnect and restore session context
- At minimum, user should see a warning before reload if active session will be lost
Error Messages/Logs
No error is shown - the session simply disappears and VS Code restarts with Claude Code in a fresh state.
Steps to Reproduce
- Open Claude Code in VS Code and start a conversation with multiple tool calls
- Perform any Developer Tools action that triggers a window reload:
- Ctrl+Shift+P → "Developer: Reload Window"
- Open DevTools (Ctrl+Shift+I) and press Ctrl+R to refresh
- Enable/disable an extension that requires reload
- Claude Code session is immediately lost
- After reload, Claude Code is in fresh state with no session history
Claude Model
Opus 4.5
Is this a regression?
I don't know
Last Working Version
N/A
Claude Code Version
2.0.82
Platform
Anthropic API
Operating System
Windows 11
Terminal/Shell
VS Code Integrated Terminal (Git Bash)
Additional Information
Use case: This is disruptive for power users who frequently use Developer Tools for debugging VS Code extensions or checking webview content. The reload action is a standard VS Code operation that shouldn't destroy active sessions.
Suggested fixes:
- Hook into VS Code's
vscode.workspace.onWillSaveTextDocumentor similar lifecycle events to detect pending reload - Persist critical session state to disk before window unload
- Implement session resume after reload (similar to browser tab restore)
- At minimum, show a modal warning: "Active Claude Code session will be lost. Continue?"
Related Issues: #13130 (auto-update crash), #850 (closed - VS Code crashes and reloads)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗