VSCode extension: chat panel renders blank for ~2s when refocusing tab
Bug: Claude Code panel renders blank/black for ~2 seconds when switching back to its tab from another VSCode editor tab
Summary
When I switch from another editor tab (e.g. a Simple Browser / Live Server preview tab) back to a Claude Code chat tab, the Claude Code panel does not render its conversation history immediately. For about 2 seconds, only the chat input area and a thin strip at the very top of the panel are visible — the rest of the panel (where the conversation history should appear) is empty/black. After the delay, the conversation history paints correctly.
This makes tab-switching feel broken, since the chat appears "empty" on first focus even though messages exist.
Steps to reproduce
- Open a workspace in VSCode that has the Claude Code extension installed and signed in.
- Open at least one Claude Code chat tab (one with an existing conversation that has enough content to scroll).
- Open a Simple Browser tab (or any other editor tab —
Ctrl+Shift+P→ "Simple Browser: Show" → enter any URL such as a localhost dev server). - Click the Simple Browser tab to view it.
- Click back on the Claude Code chat tab.
Expected: The Claude Code chat tab paints its full conversation history immediately on focus.
Actual: The chat input area renders at the top, but the conversation history area below it is empty/black for roughly 2 seconds before finally rendering.
Frequency
Reproduces consistently every time I switch back to a Claude Code chat tab from another editor tab.
Environment
- OS: Windows
- VSCode: 1.120.0
- Claude Code extension version: 2.1.142
- Workspace type: Standard local workspace (not a remote/SSH/WSL/Codespaces session, as far as I can tell)
- Other extensions active during repro: Live Server (used to host the Simple Browser preview)
Additional context
- I have two Claude Code chat tabs open at once during the repro ("Reuse timeline component..." and "Claude Code"); I haven't tested whether the problem also happens with only one chat tab open.
- The conversation history does render correctly eventually — this isn't a permanent rendering failure, it's a delayed/missed initial paint on tab focus.
- A screen recording of the bug is available; happy to attach it to this issue.
Suspected cause
Looks like the webview/render isn't being re-laid-out (or its scroll viewport isn't being re-measured) until some delayed event fires after the tab regains focus.
https://github.com/user-attachments/assets/8eb24bc6-29dd-44e3-bf8f-e8798bf0552c
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗