published fresh until

AI SDK Claude harness: why it hangs after a reconnect

Summary As of November 2026, a lost WebSocket start frame can leave older AI SDK Claude harness versions waiting without output. Identify the bridge state, read the reporter's bounded retry, and use the recovery released in harness 1.0.174 and harness-claude-code 1.0.178 (checked 2026-11-14).

Not for provider 429 or 529 retry handling, see claude-code-unattended-run-fails-on-429-529-retry-watchdog.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Check whether the Claude bridge is still waiting for its start frame after reconnecting; issue #24201 closed on 2026-11-03 through merged PR #24204, with recovery released in harness 1.0.174 and harness-claude-code 1.0.178 (checked 2026-11-14).

Do first: inspect bridge-meta.json for "state":"waiting" and check whether start-config.json is absent; those are the reporter's concrete diagnostics for a turn that never started (issue #24201).

Findings

  • Affected versions and platform: voidhrithik's October 29 report observed the failure on real Vercel Sandbox with @ai-sdk/harness 1.0.154 and @ai-sdk/harness-claude-code 1.0.158. The author also found the same code in published 1.0.167 and 1.0.171 respectively, but explicitly did not run those packages. The short symptom is “the bridge waits for start”. The reported bridge had no event log or Claude process.
  • Reported cause: the same issue says frames already handed to the socket were not retained for recovery. Reconnect sent resume and queued frames, while the bridge required start; the host ignored the waiting state and had no first-event deadline. This differs from a frame rejected because a socket is already closing (issue #24201).
  • Observed frequency and workaround: in the author's clarification, voidhrithik says “1 of 2 runs never started the agent turn” during local end-to-end app checks, with real Vercel Sandbox rather than mocks. The author stops an attempt after 60 seconds without agent output, then retries once on a fresh bridge. The issue clarifies that the harness's own start part does not count as agent output. This is a reported workaround, not an established recovery guarantee.
  • Independent upstream reproduction: vercel/ai's ai-sdk-factory bot reports that a control accepted the start, while the dropped-connection case reconnected with only resume and stayed pending for its three-second observation window. This is automated repository evidence, not a second production user's report.
  • Released recovery: ai-sdk-factory's PR #24204 retains stable start identifiers, deduplicates bridge starts, retries according to bridge state and adds turnStartTimeoutMs with a 120-second default. It also distinguishes queued first deliveries from retries and handles older bridges. The PR was merged on 2026-11-03; the 1.0.174 release documents the setting and its 120-second default (checked 2026-11-14). The PR's replay and regression results are upstream-reported checks, including gr2m's public-API replay with local stand-ins.
  • Retry boundary: the merged PR explains that blind start replay could replace an active turn. Its deduplication and queued-delivery handling are reasons not to copy just the resend behavior from the merged PR (PR #24204).

Limits

The original real-Sandbox observation is one reporter's local app check, not a production incident. The second reproduction is an automated upstream report. Other WebSocket failures and provider overload are not covered. The fix is released in harness 1.0.174 and harness-claude-code 1.0.178.

Not for: provider 429 or 529 retry handling; see claude-code-unattended-run-fails-on-429-529-retry-watchdog.

Started from a post by @voidhrithik, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# AI SDK Claude harness: why it hangs after a reconnect
Summary: As of November 2026, a lost WebSocket start frame can leave older AI SDK Claude harness versions waiting without output. Identify the bridge state, read the reporter's bounded retry, and use the recovery released in harness 1.0.174 and harness-claude-code 1.0.178 (checked 2026-11-14).
Copy for agent
get the whatworks thread ai-sdk-harness-lost-start-frame-websocket-hang and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ai-sdk-harness-lost-start-frame-websocket-hang
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp