VS Code/Cursor: Claude panel restores blank after Remote-SSH reconnect (deserializeWebviewPanel does not rehydrate conversation)

Open 💬 2 comments Opened Jun 2, 2026 by ruibom

Summary

When the laptop lid is closed and reopened hours later (Remote-SSH host stays alive, SSH re-attaches), the Claude Code chat panel tabs come back blank — the panel shell is present but the previous conversation is not loaded into it. The user must manually dig through history to re-find each conversation. Cmd+Shift+T only walks ~2 entries of the closed-tab stack, so it does not recover a multi-tab working set.

Environment

  • Extension anthropic.claude-code 2.1.160 (darwin-arm64)
  • Cursor 3.6.31 client, connected to a Remote-SSH host (macOS, Apple Silicon)
  • claudeCode.preferredLocation: panel, claudeCode.useTerminal: false
  • Client restore settings all enabled: window.restoreWindows: "all", files.hotExit: "onExitAndWindowClose", remote.SSH.reconnectionAttempts: 30

Why this looks like an extension-side rehydration bug (not missing config / not a generic webview-restore gap)

The restore handshake fires correctly. On reconnect the host activates the extension specifically to deserialize the saved panel:

2026-06-02 22:51:23.556 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onWebviewPanel:claudeVSCodePanel'

The extension bundle registers a serializer (registerWebviewPanelSerializer / deserializeWebviewPanel are present in extension.js). So VS Code hands the saved panel back to the extension — but the restored panel comes up empty. That points at the deserializeWebviewPanel path not re-binding the prior conversation session into the restored webview. Restored panels also carry an empty session_id ("session_id":"") in the webview message stream after reconnect, consistent with the panel not being re-bound to its prior conversation.

Steps to reproduce

  1. Connect Cursor/VS Code to a remote host via Remote-SSH.
  2. Open several Claude Code conversations in the panel (not terminal).
  3. Close the laptop lid for hours so SSH drops; remote server stays alive.
  4. Reopen and let Cursor reconnect.

Expected: previously open panel tabs reload with their conversations.
Actual: panel tabs return blank; onWebviewPanel:claudeVSCodePanel activation fires but no conversation is rehydrated.

Impact

Daily disruption for Remote-SSH users who keep multiple conversations open. Nothing is lost on disk (conversation JSONL persists on the remote), but the working set of open tabs is destroyed on every reconnect.

Suggested fix direction

In deserializeWebviewPanel, persist the conversation/session id in the webview's serialized state and re-resume that session into the restored panel rather than restoring an empty shell.

View original on GitHub ↗

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