Repository navigation
Description
Summary
The follow-up composer's submit button intermittently goes grey and nothing can be sent. Enter, the send button, and Cmd/Ctrl+Enter all do nothing. It happens most often while a turn looks active. Refreshing sometimes fixes it, and sometimes it takes a while or several refreshes.
Two defects combine to cause this:
- With the default "Enter steers the active thread" setting, the composer is fully disabled while the thread's runtime status is
host-reconnectingorwaiting-for-host. Those statuses put the composer in queue mode, but the steer check only allowsactive/provisioning/starting. The primary button is therefore disabled, and the Cmd+Enter queue fallback is disabled too. - After the host reconnects, clients are never told that the thread's runtime status changed. When the daemon socket closes, the server notifies every thread on that host with
status-changed. When the session reopens, it only notifies threads whose durable status it actually changes. A thread that staysactiveacross a brief reconnect keeps showinghost-reconnectingin every open client until some other thread event or a refresh refetches it. That is why the button stays grey after the host is back.
Expected: the user can always at least queue a message while the host is reconnecting or offline, and the composer returns to normal as soon as the host reconnects.
Versions and environment
- bb
0.43.4-nightly.35739502552.1, web app (also reached through bb Connect) against a remote bb server, with a macOS host daemon enrolled over a tunnel steerActiveThreadOnEnter: true(the default, app-settings.ts#L50)- Code references are at
main@1a4ddf493f64b38978cfb00ab9a26b7b7737116a
Steps to reproduce
- Keep Settings → General → "Enter steers the active thread" at its default (on).
- Start a turn on any thread whose environment is on a host daemon, and type a follow-up in the composer.
- Briefly drop the host daemon's connection while the turn is running. For example, restart the tunnel or pause network access for a few seconds, which is shorter than the active-work disconnect grace period so the turn is not interrupted.
- Observe: while the thread shows "reconnecting", the submit button is grey, and Enter and Cmd+Enter do nothing.
- Let the daemon reconnect. Observe: the button often stays grey, because the thread still shows
host-reconnecting. A page refresh refetches the thread and restores the button.
Expected vs actual
Actual: the composer is fully disabled while the thread is host-reconnecting or waiting-for-host, and it can stay disabled after the host has reconnected until a refetch.
Expected: Enter queues the message (or steers once the host is back), and the composer updates as soon as the host reconnects.
Evidence (code path)
Defect 1: steer-on-Enter disables the only submit path during host reconnects
- The composer queues follow-ups when the status is
active,host-reconnecting,provisioning,starting,stopping, orwaiting-for-host: threadDetailPromptSubmission.ts#L122-L133.submitModebecomes{ kind: "queue" }. - The steer check only accepts
active,provisioning, orstarting: threadDetailPromptSubmission.ts#L185-L207. With draft text and ahost-reconnectingorwaiting-for-hoststatus,canSubmitFollowUpShortcutreturnsfalse. - With
submitMode.kind === "queue"and steer-on-Enter enabled,steerOnPrimarySubmitis true, and the primary button is disabled whenever!composer.canModifierSubmit: FollowUpPromptBox.tsx#L596-L597 and #L723-L726.onModifierSubmitisundefinedfor the same reason, so the Cmd+Enter queue path is gone too. There is no way to send. - The same
canSubmitFollowUpShortcutalso returnsfalsewhile any queued-message mutation is pending (isQueueMutationPending, ThreadDetailPromptArea.tsx#L1087-L1096). A slow queued-message send, reorder, or delete therefore also greys out the primary button during an active turn. That one is short-lived; it is noted here in case it shows up as a separate, shorter symptom.
Defect 2: runtime display status is not refreshed when the host reconnects
thread.runtime.displayStatusis computed on the server when the thread is read, from whether the host has an open daemon session: thread-runtime-display.ts#L187-L250.- On socket close,
handleDaemonSocketClosedcallsnotifyHostThreadRuntimeStatusChanged, which sendsstatus-changedfor every thread on the host: session-owner-side-effects.ts#L137-L176. Clients refetch and seehost-reconnecting. - On session open,
handleHostSessionOpeneddoes not call it: session-owner-side-effects.ts#L80-L135.reconcileDaemonReportedThreadsonly applies lifecycle events to threads whose durable status changes, so anactivethread that survives a same-instance reconnect gets no notification. - The hub does publish a host-level
host-connectedevent, but the client only uses it to refresh hosts, projects, the sidebar, thread search, provider, and execution-option queries. It does not refresh thread detail or thread lists: realtime-cache-registry.ts#L506-L523. - Result: after a brief reconnect, the client keeps the stale
host-reconnectingstatus, and Defect 1 keeps the composer disabled until a refetch.
Possible fixes (for triage)
- In
canSubmitFollowUpShortcut, or in howFollowUpPromptBoxcomputesdisabled: when steering is not possible, fall back to queueing on the primary action instead of disabling it. While the host ishost-reconnectingorwaiting-for-host, Enter should queue and the label should say so. - Call
notifyHostThreadRuntimeStatusChanged(deps, hostId)fromhandleHostSessionOpened, or dirty the thread runtime queries for that host on the client'shost-connectedevent, sodisplayStatusreturns toactiveas soon as the daemon is back.
What I ruled out / not verified
- Not a duplicate: searched "submit button disabled", "send button greyed out", "host-reconnecting composer", "waiting-for-host submit", and "steer disabled reconnect". Agents die with the daemon: run bridge workers over a reconnectable transport so updates don't interrupt in-flight work #3143 (agents dying with the daemon) is related context but a different bug.
- The
pendingthread status from the recent "hold messages until the host is ready" work does not disable the composer. It is not in the queue-status list, so it resolves toready. The part of the queueing work involved here is thehost-reconnecting/waiting-for-hostqueue mode interacting with steer-on-Enter. - Not reproduced live. Dropping the daemon connection on the reporter's server would interrupt every running thread, so this report is from the code path at the commit above. The reporter sees the symptom regularly and intermittently, during active turns, and sometimes needs several refreshes. That fits brief daemon reconnects plus the missing reconnect notification. Their server has logged daemon reconnects today (
thr_wuyg2jh28candthr_45a8vs9apuboth showhost-connection-lostinterruptions at 12:31Z). - A regression test at the exact code path would call
canSubmitFollowUpShortcut({ hasPromptDraftInput: true, isFollowUpSubmitting: false, isQueueMutationPending: false, queuedMessageCount: 0, runtimeDisplayStatus: "host-reconnecting", submitModeKind: "queue" }), which returnsfalse, together withbuildFollowUpSubmitMode(...)returning{ kind: "queue" }for the same status.
Suggested priority and effort
High priority, small effort. Everyone on the default steer-on-Enter setting with a remote or tunnelled host is affected. The user cannot send anything, and the only workaround is refreshing, sometimes repeatedly. No data is lost; the draft is kept.
BB-Thread-ID: thr_dkhvpa3yvi
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 25, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification preserved: Bug · High priority · Medium effort;
threads,ui,host.Reproduction report: PARTIALLY REPRODUCED · label:
partial-repro.High confidence in the composer cause: primary submission selects an unavailable steer callback during host reconnect/wait states. The authored component regression failed for both states in two clean trusted-main checkouts; all 46 existing cases passed. Live browser appearance and reconnect recovery remain unverified; the missing reconnect notification has static support only.
No PR: the complete remedy spans composer policy and server session notifications, exceeding this rule’s one-subsystem limit.
Let the composer send while its thread waits for the host
Let the composer send while its thread waits for the host
Mark silent hosts offline without cancelling their work (get-bb#4271)