Active Claude Code chat tabs are not restored on VS Code restart (webview tabs dropped; no WebviewPanelSerializer)
Summary
When VS Code restarts (window reload, host reconnect, or app restart), all open Claude Code chat tabs disappear from the editor tab bar. VS Code restores its own editors and other webview-based extension tabs across a reload, but the Claude Code chat webviews are not rehydrated.
Environment
- Claude Code VS Code extension (native webview chat tabs)
- VS Code on a remote host (Remote-SSH); also reproduces locally
- Multiple concurrent chat tabs open in the editor area (8–11 typical)
Steps to reproduce
- Open several Claude Code chat tabs in the editor area.
- Reload the window (Developer: Reload Window) or restart VS Code.
- Observe: the chat tabs are gone from the tab bar.
Expected
The previously-open chat tabs reappear after reload, in their prior order — the way VS Code restores editors and other extensions' webview panels.
Actual
All chat tabs are dropped. The user must manually reopen each from the Claude Code tab list, re-order them to match the prior working order, and verify none was forgotten. This recurs on every restart and the friction scales with the number of open tabs.
Likely cause (external observation)
VS Code rehydrates webview-backed extension tabs across a reload only when the extension registers a WebviewPanelSerializer (window.registerWebviewPanelSerializer + retainContextWhenHidden). The Claude Code chat tabs appear not to implement serialization, so VS Code discards them on reload rather than calling back into the extension to restore them.
Impact
- Repeated manual recovery on every restart.
- Risk of silently forgetting a tab → loss of an active conversation's working context.
- Worse for multi-tab workflows (8–11 concurrent tabs here).
Requested fix
Register a WebviewPanelSerializer for Claude Code chat tabs so VS Code restores them (with their claude --resume <uuid> session identity) across a window reload / restart. If full state restoration is heavy, even restoring the tab as a resumable placeholder that rehydrates on focus would resolve the manual-recall burden.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗