Skip to content

Composer submit greys out during host reconnects and stays disabled after the host is back #4353

Closed

Description

@brsbl

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:

  1. With the default "Enter steers the active thread" setting, the composer is fully disabled while the thread's runtime status is host-reconnecting or waiting-for-host. Those statuses put the composer in queue mode, but the steer check only allows active / provisioning / starting. The primary button is therefore disabled, and the Cmd+Enter queue fallback is disabled too.
  2. 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 stays active across a brief reconnect keeps showing host-reconnecting in 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

  1. Keep Settings → General → "Enter steers the active thread" at its default (on).
  2. Start a turn on any thread whose environment is on a host daemon, and type a follow-up in the composer.
  3. 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.
  4. Observe: while the thread shows "reconnecting", the submit button is grey, and Enter and Cmd+Enter do nothing.
  5. 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, or waiting-for-host: threadDetailPromptSubmission.ts#L122-L133. submitMode becomes { kind: "queue" }.
  • The steer check only accepts active, provisioning, or starting: threadDetailPromptSubmission.ts#L185-L207. With draft text and a host-reconnecting or waiting-for-host status, canSubmitFollowUpShortcut returns false.
  • With submitMode.kind === "queue" and steer-on-Enter enabled, steerOnPrimarySubmit is true, and the primary button is disabled whenever !composer.canModifierSubmit: FollowUpPromptBox.tsx#L596-L597 and #L723-L726. onModifierSubmit is undefined for the same reason, so the Cmd+Enter queue path is gone too. There is no way to send.
  • The same canSubmitFollowUpShortcut also returns false while 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.displayStatus is 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, handleDaemonSocketClosed calls notifyHostThreadRuntimeStatusChanged, which sends status-changed for every thread on the host: session-owner-side-effects.ts#L137-L176. Clients refetch and see host-reconnecting.
  • On session open, handleHostSessionOpened does not call it: session-owner-side-effects.ts#L80-L135. reconcileDaemonReportedThreads only applies lifecycle events to threads whose durable status changes, so an active thread that survives a same-instance reconnect gets no notification.
  • The hub does publish a host-level host-connected event, 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-reconnecting status, and Defect 1 keeps the composer disabled until a refetch.

Possible fixes (for triage)

  • In canSubmitFollowUpShortcut, or in how FollowUpPromptBox computes disabled: when steering is not possible, fall back to queueing on the primary action instead of disabling it. While the host is host-reconnecting or waiting-for-host, Enter should queue and the label should say so.
  • Call notifyHostThreadRuntimeStatusChanged(deps, hostId) from handleHostSessionOpened, or dirty the thread runtime queries for that host on the client's host-connected event, so displayStatus returns to active as 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 pending thread 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 to ready. The part of the queueing work involved here is the host-reconnecting / waiting-for-host queue 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_wuyg2jh28c and thr_45a8vs9apu both show host-connection-lost interruptions 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 returns false, together with buildFollowUpSubmitMode(...) 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

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

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification 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.

    AGENT GENERATED

  5. added 2 commits that reference this issue on Sep 26, 2026
    7ff9af5
    ccfcecd
  6. 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-reprothreadsui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions