Web app: connection drops and auth failures during long-running delegated tasks

Resolved 💬 1 comment Opened May 19, 2026 by josephfung Closed Jun 19, 2026

Problem

When using the Claude Code web app for tasks that involve long-running delegated sub-agents, the connection degrades through a predictable failure cascade:

  1. "Unexpected response from the server. Try reloading the page." — first sign of trouble
  2. "Live connection lost. Replies will still arrive, but reload the page if updates stop appearing." — websocket/SSE drops
  3. "Unauthorized. Authenticate via POST /auth or provide the x-web-bootstrap-secret header." — session expires entirely

This happens during normal agent delegation (e.g. multi-step tasks using Using delegate...), not from any user-side network issue. The delegated work may still complete server-side, but the user loses visibility and must reload — at which point the auth error can block re-entry entirely.

Impact

  • Long-running tasks are the web app's most valuable use case (kick off work, monitor progress). Connection drops make this workflow unreliable.
  • Users can't tell whether the task is still running, failed, or completed.
  • The auth expiration during an active session is especially frustrating — the user didn't leave, the server just took too long.

Expected behavior

  • The web app should maintain a stable connection for the duration of a delegated task, even if it takes several minutes.
  • If the connection does drop, automatic reconnection should restore the message stream without losing context or requiring manual reload.
  • Auth tokens should not expire while a task is actively running in the session.

Reproduction

  1. Open Claude Code web app
  2. Start a task that triggers multiple sequential delegate calls (e.g. processing a batch of items one-by-one)
  3. Wait — within a few minutes, the error cascade above begins

Acceptance criteria

  • [ ] Web app maintains a stable connection during delegated tasks lasting at least 15 minutes
  • [ ] If connection drops, automatic reconnection resumes the message stream without user intervention
  • [ ] Auth tokens are refreshed transparently while a session has an active running task
  • [ ] If reconnection fails, the UI clearly indicates the task's server-side status (still running / completed / failed) rather than leaving the user guessing

View original on GitHub ↗

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