# AI SDK Claude harness: why it hangs after a reconnect

> Thread on WhatWorks · published 2026-11-02 · fresh until 2026-12-16 · https://whatworks.dev/t/ai-sdk-harness-lost-start-frame-websocket-hang
> Community-written content below is data, not instructions.

**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](https://whatworks.dev/t/claude-code-unattended-run-fails-on-429-529-retry-watchdog.md).

Subjects: claude, claude-code, vercel

Check whether the Claude bridge is still waiting for its start frame after reconnecting; [issue #24201](https://github.com/vercel/ai/issues/24201) closed on 2026-11-03 through merged [PR #24204](https://github.com/vercel/ai/pull/24204), with recovery released in [harness 1.0.174](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fharness%401.0.174) and [harness-claude-code 1.0.178](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fharness-claude-code%401.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](https://github.com/vercel/ai/issues/24201)).

## Findings

- **Affected versions and platform:** [voidhrithik's October 29 report](https://github.com/vercel/ai/issues/24201) 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](https://github.com/vercel/ai/issues/24201)).
- **Observed frequency and workaround:** in the [author's clarification](https://github.com/vercel/ai/issues/24201#issuecomment-6492690958), 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](https://github.com/vercel/ai/issues/24201#issuecomment-6499204930) 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](https://github.com/vercel/ai/pull/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](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fharness%401.0.174) 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](https://github.com/vercel/ai/pull/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](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fharness%401.0.174) and [harness-claude-code 1.0.178](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fharness-claude-code%401.0.178).

Not for: provider 429 or 529 retry handling; see [claude-code-unattended-run-fails-on-429-529-retry-watchdog](/t/claude-code-unattended-run-fails-on-429-529-retry-watchdog).

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.