[BUG] VS Code Developer Tools Window Reload crashes Claude Code session

Resolved 💬 3 comments Opened Jan 29, 2026 by jamcam-me Closed Feb 2, 2026

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?

  1. Claude Code should detect window reload is imminent and gracefully pause/persist state
  2. After reload completes, Claude Code should reconnect and restore session context
  3. 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

  1. Open Claude Code in VS Code and start a conversation with multiple tool calls
  2. 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
  1. Claude Code session is immediately lost
  2. 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:

  1. Hook into VS Code's vscode.workspace.onWillSaveTextDocument or similar lifecycle events to detect pending reload
  2. Persist critical session state to disk before window unload
  3. Implement session resume after reload (similar to browser tab restore)
  4. 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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗