claude-code - 💡(How to fix) Fix VSCode extension: chat panel renders blank for ~2s when refocusing tab

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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

  1. Open a workspace in VSCode that has the Claude Code extension installed and signed in.
  2. Open at least one Claude Code chat tab (one with an existing conversation that has enough content to scroll).
  3. 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).
  4. Click the Simple Browser tab to view it.
  5. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING