VS Code: Chat history lost when dragging tab to new window
Description
When dragging a Claude Code chat tab from one VS Code window to another (e.g., drag-and-drop to create a new window), the entire conversation history disappears from the UI. The backend state is preserved (Claude still has full context and can reference prior messages), but the rendered chat is empty.
Steps to Reproduce
- Open Claude Code in a VS Code window
- Have an active conversation with messages
- Drag the Claude Code tab outside the VS Code window to create a new window (or into an existing second window)
- The chat panel renders empty - all conversation history is gone from the UI
Expected Behavior
Chat history should persist when the tab is moved between VS Code windows.
Actual Behavior
The webview is destroyed and recreated during the cross-window move, losing all rendered conversation state. The backend conversation is intact (Claude can still reference everything discussed), but the user sees an empty chat.
Possible Fix
Implementing webview state serialization (getState/setState) so the chat UI survives cross-window tab moves.
Environment
- VS Code (latest)
- macOS
- Claude Code VS Code extension
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗