Browser pane never navigates: navigatePreview resolves context by `preview-{sessionId}` instead of serverId

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 18, 2026

Summary

In the Claude Desktop Code tab, the Browser/preview pane never displays a running dev server. Clicking a server card in the pane and typing a URL into the pane's URL bar both fail silently — no error surfaces in the UI, the pane just keeps showing its "Open a server to preview your app, or enter a URL" empty state.

The app log shows the preview context is registered under the server's UUID but looked up under a synthetic preview-{sessionId} key, so the lookup misses and navigation is dropped.

Log evidence

Context is created keyed by the real serverId:

15:31:39 [info] [Preview] Created context {
  serverId: '4520a2da-cacb-4310-aa5e-2bad837bef50',
  port: 6007,
  totalContexts: 1
}
15:31:49 [info] [Preview] Server ready (HTTP responding) { serverId: '4520a2da-cacb-4310-aa5e-2bad837bef50' }

Navigation then looks it up by a different key and finds nothing:

15:32:41 [info] [Preview] navigatePreview: no context { serverId: 'preview-local_<sessionId>' }

Note totalContexts: 1 — a context exists; the key used for lookup just does not match the key used for registration.

Also seen earlier in the same log, with the pane reportedly open:

15:29:36 [info] [Preview] Reaped hidden preview view { serverId: 'daccb183-...' }

Expected vs actual

  • Expected: clicking the server card loads the dev server in the pane.
  • Actual: nothing renders and nothing is reported to the user; only the log records navigatePreview: no context.

Reproduction

  1. Add a .claude/launch.json server entry and start it from the Code tab.
  2. Confirm the server is genuinely serving (curl -I http://localhost:<port>/ returns 200).
  3. Click the server card in the Browser pane — nothing loads.
  4. Type http://localhost:<port> into the pane's URL bar — nothing loads.
  5. grep '\[Preview\]' ~/Library/Logs/Claude/main.log shows the key mismatch above.

Ruled out

  • Not the server. Verified listening via lsof and HTTP 200 via curl on localhost, 127.0.0.1, and [::1].
  • Not IPv4/IPv6 loopback. Reproduced with a server bound IPv6-only ([::1]), one bound IPv4-only (127.0.0.1), and one dual-stack (*:PORT). All three fail identically in the pane.
  • Not app-specific. Reproduced with both a Storybook dev server and a trivial python3 -m http.server serving a one-line static HTML file.
  • Not a stale/wedged state. Survives a full quit (Cmd+Q) and relaunch.
  • Not the Claude Chrome extension. Not installed, and the in-app browser is a separate embedded surface.
  • The embedded browser itself works. ~/Library/Logs/Claude/in-app-browser.log shows it successfully loading and capturing console output from the same servers earlier the same day, so the regression is in navigation dispatch, not rendering.

Note for anyone debugging this

The MCP preview_screenshot tool still returns correct screenshots while the user's pane is blank, because it addresses the context by real serverId. It is therefore not valid evidence that the pane is working — this cost a lot of misdirected debugging.

Environment

  • Claude Desktop 2.2553.1
  • macOS 26.6.2, arm64

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗