Repository navigation
Description
Summary
A Claude Code thread was waiting on an AskUserQuestion. Its host daemon's WebSocket dropped and the same daemon instance reconnected 14 s later. The server marked the question interrupted but left the turn active, and the provider kept waiting for an answer nobody could give. bb accepted every later message as a steer into that turn (turn/input/accepted), and none of them was processed. The thread stayed stuck for about five hours until someone ran bb thread stop and re-sent the messages. The interaction's reason says "retry the thread to continue", but the thread was active, so no retry was offered.
Versions and environment
- Server: bb-app 0.43.4 (npm, systemd unit on Linux).
- Host daemon: bb-app 0.43.4 on a remote Linux machine (Linux 7.0.0-1008-aws), connected through bb Connect.
- Provider:
claude-code, Claude Code 2.1.308, modelclaude-opus-5-5, worktree environment.
Steps to reproduce
Observed on 0.43.4:
- Start a Claude Code thread on a remote host and have it call
AskUserQuestion. - While the question is pending, drop the daemon's WebSocket for 6–29 s without restarting the daemon, so that it reconnects as the same instance.
- Once the socket has been closed for 5 s, the question turns
interrupted. The thread staysactive. bb thread tell <thread> "continue"is accepted as a steer. The agent never responds.
On 0.43.4 the trigger is the 5 s disconnect timer (completeDaemonDisconnectGrace), which #4271 removed. Main still reaches the same state by another path. When the live interactive.resolve command fails, for example with host_unavailable because the socket closed while the answer was in flight, settleInteractiveResolveCommandResultInTransaction interrupts the interaction. The provider's wait in the daemon's InteractiveRequestRegistry stays open, and nothing tells the daemon that the interaction ended: onSessionOpened does not look at open provider waits. I have not reproduced the main path live. The linked PR adds a daemon test that hangs on main for this case (unverified on a live main server).
Expected vs actual
Expected: after a reconnect, the daemon and the server agree on which provider requests are still open. Either the question can still be answered, or the provider's wait ends so that the turn continues and reads its steers.
Actual (bb thread log --json, trimmed; times UTC):
929 19:43:48 item/started toolCall AskUserQuestion status=pending
930 19:43:48 system/interaction/lifecycle pint_rgw7zfam2y status=pending
933 23:04:47 system/interaction/lifecycle pint_rgw7zfam2y status=interrupted
statusReason="Host daemon disconnected while awaiting user interaction; retry the thread to continue"
934 00:24:11 client/turn/requested target={kind: steer, expectedTurnId: dabb017328-t1} <user message>
935 00:24:12 turn/input/accepted
936 00:42:23 client/turn/requested target=steer <user message + image>
937 00:42:24 turn/input/accepted
938 01:13:57 client/turn/requested target=steer <user message>
939 01:13:58 turn/input/accepted
(no further events until a manual `bb thread stop` the next day)
Evidence
- Daemon log on the host:
23:04:42.160 Disconnected from server code=1006, then23:04:56.136 Connected to server sessionId=hses_vd6r3tb2ek. The server interrupted the question at 23:04:47.198, 5 s after the close. - The daemon was not restarted. The
bb-provider-bridge-workerandclaudeprocesses were 28 h old when inspected, matching the thread's creation time. - After
bb thread stop, the event log showsturn/completed status=interruptedfordabb017328-t1. The next message started a new turn that resumed the same Claude session. - Thread
thr_syxtiw4e2ion a self-hosted server.
What you ruled out
- Not Messages to a thread blocked on AskUserQuestion are dropped, and only the sender is told #1650. That issue covers messages sent to a thread with a pending question (now a 409). Here the question was already
interrupted, so the steer was accepted. - Not Host heartbeat timeout interrupts a long-running Claude turn with connection-lost error #4364. The turn was never interrupted, and the provider stayed alive the whole time.
- Not a daemon restart: same
instanceId, and the provider process survived. - Mark silent hosts offline without cancelling their work #4271 removed the 0.43.4 trigger, but main still interrupts an interaction when its answer cannot be delivered, without telling the daemon.
Suggested priority and effort (optional)
Work stops until someone notices and runs bb thread stop. Messages sent in the meantime are accepted but silently not processed. Workaround: bb thread stop <thread>, then re-send the messages. The proposed fix is small and daemon-only.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 25, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilothost,threads,provider-claude-code,ask-user-question,confirmed-repro.Sync open questions and background tasks when a daemon reconnects (ge…