Skip to content

Host heartbeat timeout interrupts a long-running Claude turn with connection-lost error #4364

Closed

Description

@brsbl

Summary

A long-running Claude Code turn was interrupted after the execution host stopped receiving server heartbeat acknowledgements. BB displayed Thread interrupted because the connection to the host was lost and Please retry the thread to continue; the screenshot shows nearly seven hours of prior work. The transport failure is confirmed, but the reason acknowledgements stopped is not yet known.

Versions and environment

  • bb 0.43.4-nightly.35739502552.1, web UI through BB Connect; macOS 26.5.2 execution host (host_37m3sgpq59, Bersabel’s MacBook Air)
  • Claude Code CLI 2.1.282, provider claude-code, model Opus 5.5 Medium
  • BB thread thr_uxg8nhnedz, project proj_khiw2za95v, environment env_fxan6jxik3 (project checkout)
  • Source inspection against main at ddb962879f5584604d37726024329a4b73c65c60

Steps to reproduce

These describe the observed incident; the initiating network/server condition has not been reproduced independently:

  1. Run a Claude Code turn on an enrolled host for several hours. The affected turn started at 2026-09-25 10:07:12 UTC.
  2. At 17:04:09 UTC, the host daemon logs Server heartbeat acknowledgements stopped; reconnecting, then Disconnected from server with reason=heartbeat-ack-timeout, close code 1013.
  3. The connection continues to drop/reconnect. At 17:05:15 UTC, inspect the thread timeline: it records an interrupted turn and the host-connection error shown below.

No preview action or daemon restart was established as the initiating event in this case.

Expected vs actual

Actual thread events, in order:

seq 4794  turn/completed status=interrupted
seq 4795  system/error code=thread_command_failed
          Thread interrupted because the connection to the host was lost
          Please retry the thread to continue.
seq 4796  system/thread/interrupted reason=host-daemon-restarted cause=host-connection-lost

Actual host log excerpt:

2026-09-25 17:04:09 UTC  Server heartbeat acknowledgements stopped; reconnecting
2026-09-25 17:04:09 UTC  Disconnected from server  reason=heartbeat-ack-timeout code=1013

The screenshot shows the error and the interrupted long-running turn:

Host connection lost error after a long-running turn

Expected: a transient heartbeat failure should be diagnosed and, where possible, preserve or recover in-flight work. If interruption is unavoidable, the error should expose the observed heartbeat timeout and leave the thread in an accurate retryable state. This report does not assume retrying the turn automatically is safe after possible workspace mutations.

Evidence and why this error is sent

When the daemon connection remains absent past the active-work disconnect grace period, the server interrupts active host threads with reason=host-daemon-restarted and cause=host-connection-lost: session-owner-side-effects.ts#L267-L285. That cause maps to the exact user-facing message and retry detail: thread-lifecycle.ts#L413-L445. The server appends the interrupted completion, system/error, and thread-interrupted event: thread-lifecycle.ts#L1734-L1837.

This explains why BB sends the error. It does not prove why heartbeat acknowledgements stopped; the available daemon log identifies the immediate transport timeout only.

What I ruled out

Suggested priority and effort

High impact when it occurs: one long-running turn stopped and required retry; any partially completed workspace mutations need inspection before retry. Cause and repair effort remain unknown.

Originating BB thread: thr_tcftpwzg3f.

AGENT GENERATED

Activity

  1. brsbl commented on Sep 25, 2026

    @brsbl
    CollaboratorAuthor

    Additional evidence from the same thread after the user stopped it:

    • At 2026-09-25 10:07:42 UTC, Claude started AskUserQuestion (event 4790). The call contains a complete prompt about whether to override the one-review limit for PR Let users choose which quick actions thread rows show #4265 and two options, Run it (override) and Skip it. BB created pending interaction pint_nrz8h82hdx (event 4791).
    • At 10:09:15 UTC, the host daemon logged Server heartbeat acknowledgements stopped; reconnecting, then Disconnected from server with reason=heartbeat-ack-timeout, code 1013.
    • At 10:09:39 UTC, BB marked that question interaction interrupted with Host daemon disconnected while awaiting user interaction; retry the thread to continue (event 4792).
    • The turn itself did not receive turn/completed status=interrupted until 17:05:15 UTC, after the later heartbeat timeout already described in the issue. The question tool call received its terminal item/completed status=interrupted only when the user manually stopped the thread at 21:07:39 UTC (events 4797–4799).

    This is a second confirmed heartbeat timeout in the same turn, occurring while Claude was awaiting an answer. It does not establish why heartbeat acknowledgements stopped. The question payload was stored correctly; any empty question/config display is downstream of that storage and still needs UI evidence.

  2. added theissue type on Sep 25, 2026
  3. added
    host
    threads
    partial-repro
    on Sep 25, 2026
  4. bb-slop-cop commented on Sep 25, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Preserved Bug · High priority · Medium effort, threads, and host; added partial-repro.

    Reproduction report: PARTIALLY REPRODUCED, with low root-cause confidence. Existing trusted-main tests passed in two clean checkouts (29 tests each), exercising timeout-triggered reconnect and the subsequent connection-lost interruption events. The server interrupts active work after its disconnect grace expires; why acknowledgements stopped in the incident remains unknown.

    No PR: the initiating failure was not reproduced, so no failing regression supports a safe contained fix. The report includes commands, test sources, logs, and the next diagnostic experiment.

    AGENT GENERATED

  5. added a commit that references this issue on Sep 28, 2026
    061685c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    hostpartial-reprothreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions