claude-code - 💡(How to fix) Fix Preview panel stuck on 'Awaiting server...' when app returns 302 redirect on root path

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…

The Claude Code Desktop preview panel gets stuck on "Awaiting server..." indefinitely when the dev server returns a 302 redirect on the root path /, even though the server is fully up and healthy.

Root Cause

The Claude Code Desktop preview panel gets stuck on "Awaiting server..." indefinitely when the dev server returns a 302 redirect on the root path /, even though the server is fully up and healthy.

Fix Action

Workaround

Open http://localhost:<port> directly in a browser — the server works fine there.

RAW_BUFFERClick to expand / collapse

Bug Report

Summary

The Claude Code Desktop preview panel gets stuck on "Awaiting server..." indefinitely when the dev server returns a 302 redirect on the root path /, even though the server is fully up and healthy.

Steps to Reproduce

  1. Start a dev server that responds to GET / with a 302 redirect (e.g. Flask/Indico which redirects //bootstrap/login)
  2. Open the preview panel in Claude Code Desktop
  3. Observe that the panel shows "Awaiting server..." and never loads

Expected Behavior

The preview panel should:

  • Follow 3xx redirects and render the final destination, or
  • Treat any 3xx response as "server is up" and load the page

Actual Behavior

The preview panel polls GET / and only proceeds on 200 OK. A 302 response is treated as "server not ready", causing it to loop forever.

Workaround

Open http://localhost:<port> directly in a browser — the server works fine there.

Environment

  • Claude Code Desktop (macOS)
  • Reproducible with any server that issues a redirect on the root path (Flask, Rails, Django, etc.)

Additional Context

Confirmed the server was fully healthy during reproduction:

  • curl http://localhost:8000/HTTP 302 (fast, ~9ms)
  • curl http://localhost:8000/login/HTTP 200
  • All backing services (PostgreSQL, Redis, SMTP) responding normally

The fix could be as simple as treating 3xx status codes as "server ready" in the health-check poll, or configuring the preview to follow redirects before rendering.

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