Preview panel stuck on 'Awaiting server...' when app returns 302 redirect on root path

Status Fixed / completed
Maintainer reply ✓ Yes — amorriscode
Activity 3 comments · opened May 8, 2026 · closed May 19, 2026
💡 Likely answer: A maintainer (amorriscode, contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

3 Comments

github-actions[bot] · 5 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/48757
  2. https://github.com/anthropics/claude-code/issues/50834

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

amorriscode contributor · 4 months ago

Will be fixed in Thursday's release.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.