anthropics / anthropics/claude-code
VS Code: after an extension host restart, Claude panels never re-attach, so every session in the window looks frozen until Reload Window
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Environment
- Claude Code VS Code extension 2.1.272 (CLI 2.1.270)
- VS Code 1.136.1 (stable), single window, single-folder workspace
- Windows 11 Pro, build 26200
### What happened
Three Claude Code sessions were running in panels of one VS Code window. The window's extension host was restarted (the logs show a renderer-initiated terminate; it followed an extension being disabled from the Extensions view). Every session stopped at the same second and never processed input again. Each panel kept showing its last state — one mid-tool-call, one mid-response — with no error, no "session ended" notice and no way to continue. The sessions were not hung: the CLI processes had exited cleanly. Only a window reload (here, a full PC restart) recovered them; the transcripts were intact and `--resume` worked afterwards.
### Evidence (log excerpts, local time, paths and ids removed)
```
08:20:22.433 Claude VSCode.log Stream started - received first chunk <- last CLI output relayed
08:20:22.533 exthost.log Extension host terminating: received terminate message from renderer
08:20:23.17 exthost.log Channel has been closed (claude-code: shutdown -> closeAllChannels -> closeChannel)
08:20:23.5-25 claude MCP logs Terminating MCP server process tree / connection closed (cleanly) x4 CLI processes
08:20:25.085 main.log Extension host with pid exited with code: 0
08:20:23.373 renderer.log Started local extension host with pid
08:20:48.569 Claude VSCode.log AuthManager initialized / extension is now active / MCP Server running on port
(no further Claude log lines; no panel ever sent `init` to the new host)
```
Windows showed no sleep, crash, memory pressure or network change in that window, and a separate non-VS Code process tree kept running normally.
### Expected
When the extension reactivates in a new host, open panels either re-attach to their sessions, or clearly show the session ended with a one-click resume.
### Actual
Panels keep rendering dead sessions as live. Nothing indicates the session is gone, so the natural reaction is to wait or restart the machine.
### Reproduction (inferred from the logs above, not yet re-run in isolation)
1. Open one or more Claude Code panels and start a long-running task in each.
2. Disable any other active extension in the Extensions view and accept **Restart Extensions** (or run **Developer: Restart Extension Host**).
3. Observe the Claude panels.
### Workaround
**Developer: Reload Window**, then reopen each session from the panel's session history.
### Possibly related
#79921 (sessions freeze locally until another session receives input), #75571 (extension hangs tied to the extension host IPC layer) — different trigger, same user-visible symptom.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with Developer: Restart Extension Host while one or more Claude panels run long tasks, then inspect the Claude VSCode.log and exthost.log entries around shutdown and reactivation. Compare panel behavior before and after the new host starts. Done means panels re-attach to their sessions or clearly show that the session ended with a one-click resume, without requiring a window reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100