You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tell --mode auto injects into busy turn instead of queueing: provider error retry loop, status flips to error while turn continues #2370
Sending bb thread tell --mode auto <thread> to a thread whose agent is mid-turn attempts live injection instead of queueing. The provider bridge (pi/codex) rejects with Agent is already processing a prompt. Use steer() or followUp() to queue messages, the host retries delivery repeatedly (a loop of identical errors in the thread log), and the thread's visible status flips to errorwhile the turn continues to run normally (native transcript kept advancing throughout).
Expected
--mode auto detects the busy turn and queues the message (or the error is surfaced once, without a retry loop and without flipping thread status to error).
Actual
Repeated identical provider errors (observed 6+ identical error blocks for one logical delivery).
Thread status shows error though the turn is healthy and progressing.
The queued messages were lost (never delivered); recovery required thread stop, which then released the runtime and delivered queued messages.
bb Nightly 0.39.1-nightly.32633481796.1 (commit 7e10ea4), macOS, pi provider bridge with codex/gpt-5.6 backend. Observed repeatedly over 2026-08-24 across multiple threads (orchestrator seat + a writing lane earlier the same day — the lane instance wedged hard enough to require stop + salvage).
Repro
Have a thread mid-turn (long-running provider turn).
bb thread tell --mode auto <thread> "msg" (possibly repeat / have multiple queued tells).
Observe repeated 'already processing' errors in bb thread log, status flips to error, message never delivered.
Notes
--mode queue works reliably; the defect is in auto/steer busy-detection on this bridge.
Suggest: auto should fall back to queue on 'already processing' rather than retry-injecting; delivery errors should not flip thread status to error while the underlying turn is progressing.
Regression evidence: 386 archived session transcripts from 3 days of stable 0.39.0 operation under heavy inter-thread tell traffic contain ZERO occurrences of 'already processing a prompt' delivery errors. All 13 observed occurrences are from 2026-08-24 after switching to Nightly 0.39.1 (7e10ea4), across two threads. The failure shape is new in Nightly; stable's messaging defects were limited to steer-mode visibility. Suggests the auto-mode busy-detection/delivery path changed between 0.39.0 and 0.39.1-nightly.
Additional confirmed repro: UI steer during slow Claude Code startup
This same root cause reproduces from the app composer with Claude Code, not only from bb thread tell --mode auto with pi. When the provider takes longer than the daemon's fixed five-second pending-start wait to publish turn/started, a steer sent from the UI is rejected, rendered as Command turn.submit failed, marked as a generic run failure, and dropped even though the original turn starts moments later and completes normally.
Before Claude emits turn/started, submit a second prompt using the active-thread steer action.
Make the first turn's startup take more than five seconds (the two production occurrences took 11.3 seconds and 28.4 seconds from request to turn/started).
After five seconds, observe that the second prompt is rejected and an error row appears; shortly afterward, the original turn starts and continues normally.
This reproduced twice in the same real thread:
Attempt 1: use real icons requested at 14:42:04; wait i need comments steered at 14:42:19; steer rejected at 14:42:24; original turn/started arrived at 14:42:32. Event sequences 15222, 15224–15226, and 15230–15231.
Attempt 2: where are my commens requested at 14:47:04; stop using inline html i'm in the spec steered at 14:47:10; steer rejected at 14:47:15; original turn/started arrived at 14:47:16. Event sequences 15307, 15309–15313.
Actual error, verbatim:
Command turn.submit failed
Refusing to start a competing turn while thr_vaqgwzbtvm is still starting
Expected: preserve the second prompt and deliver it once the opening turn can accept a steer (or park it as a queued follow-up). The opening turn must remain active and healthy.
Actual: the second prompt is persisted as client/turn/requested, then rejected after the fixed five-second wait, shown as system/error, and never delivered. The original turn is not stuck: both observed original turns began after the rejection and completed normally.
Root cause
The daemon waits exactly five seconds for the opening turn id, then throws an untyped generic error if the thread is still live: thread.ts#L25-L31, thread.ts#L421-L455.
The server handles every such turn.submit failure as terminal: it appends client/turn/rejected, adds the visible system/error, applies run.failed to the thread, and does not park the refused input: thread-lifecycle.ts#L770-L811.
The original turn remains owned by the runtime and eventually emits turn/started, so the failure row describes the steer command, not a failed provider turn. Treating it as a run failure creates the false error state and makes the message loss persistent.
Current main still codifies the first half of this behavior. The focused command below passes because the test expects the rejection verbatim:
pnpm exec turbo run test --filter=@bb/host-daemon --force -- src/command-dispatch.test.ts -t "rejects auto input when a pending turn still has no id after the wait"
Test Files 1 passed (1)
Tests 1 passed | 39 skipped (40)
PR #2417 already implements the right shared fix for this exact case: classify the pending-start refusal as thread_turn_busy, keep the live turn's status, suppress the misleading system error, and park the input for later delivery. This evidence broadens the confirmed impact from CLI + pi to the app composer + Claude Code; it does not require a separate issue.
What this rules out
Not a stuck or failed Claude turn: the original turn began after each rejection and completed.
Not a double-click or duplicate request: each error maps to a distinct second prompt intentionally submitted as a steer.
Verdict: PARTIALLY REPRODUCED · root-cause confidence: high
Root cause (short): A five-second pending-start timeout returns a generic error, and the server drops the input and fails the healthy thread.
Proposed fix: Return a typed pending-start busy error. Keep the live status, park refused input, and retry after the turn ID arrives.
Caveats: PR Preserve stale sends by re-steering the live turn #2379 fixed the original active-turn injection at the base. Tests reproduced the residual daemon and server paths. No live provider or production transcripts were available.
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
This also matches a narrower delivery race seen with early follow-ups: a correction sent while a turn is starting can be refused or lost even though the recipient continues running. The important failure is not normal queue semantics; it is that BB accepts a plausible immediate-delivery path, then reports an error or loses the input while the live turn still owns the thread.
This issue is the right owner for busy or starting-turn delivery and recovery. It does not cover provider permission-mode discovery, intentional queue/steer behavior, or the separate request for file/stdin message input.
Additional recurrence on stable 0.40.0: Claude overload extends the starting-turn race
This reproduced in the macOS desktop app with the Claude Code provider on stable bb 0.40.0.
Sequence
An idle thread received a normal prompt.
A second prompt was sent as a steer 5.2 seconds later, before any turn-start event appeared.
The steer was rejected with: “Refusing to start a competing turn while the thread is still starting.” The thread then displayed an error even though the original provider process remained active.
A third prompt sent shortly afterward was also rejected as a competing turn.
The provider reported nine HTTP 529 overloaded retries before any turn-start event.
About 129 seconds after the original request, bb emitted provider_turn_start_timeout. The provider process nevertheless remained alive until the user explicitly stopped the thread.
The second and third prompts were not delivered. After stopping the orphaned runtime, neither a normal tell nor edit-and-rerun could recover the request: bb reported that the thread was inactive and that the selected request had not been accepted into exactly one turn. Recovery therefore required continuing from the last completed turn in a fork.
Expected
A prompt sent while the opening turn is still starting is preserved and delivered when the turn can accept it, or parked as a queued follow-up.
Rejecting that prompt does not falsely mark the still-running provider turn as errored.
If startup reaches the watchdog threshold, the accepted user request remains directly retryable after the provider runtime is stopped.
This appears to be the same starting-turn delivery and recovery defect already tracked here, with provider overload making the race long enough to reach the watchdog.
Messages sent while an opening turn has no turn ID are persisted and delivered in order.
Stale steer targets are handled safely.
A healthy provider turn is not marked failed.
I observed no automatic duplicate-delivery loop.
The later stable-0.40.0 report is consistent with behavior before these fixes landed.
There is a separate edge case: if the provider never starts the original request and the user stops the runtime, BB cannot explicitly retry that stored request. I explored that in #3030, but the resulting recovery experience was delayed, difficult to discover, and disproportionate to this issue. Users can resend after stopping; a dedicated recovery feature should only be revisited with a clear, persistent UI.
A remaining server admission race related to this report reproduces on main at accd5595926b080a1e17d1ea9b2fa2d7d0505ac6. This is narrower than the provider-busy handling proposed in closed #2417 and precedes the startup state addressed by merged #2816.
Two sends can overlap during asynchronous preparation, both observe admission as available, and dispatch competing starts. An exact BB command_failed competing-start refusal then reaches generic failure settlement, potentially losing pending delivery or marking the winning turn failed. Stopping or pausing the thread before the losing refusal arrives can also produce a false child-failure notice.
A prepared seven-file server/test fix serializes preparation per thread and durably queues only narrowly recognized, unaccepted competing-start refusals. It preserves steering, existing startup waits, notification batching, and the daemon guard. Stop/pause prevents automatic requeue without letting a losing refusal fail the winner.
The deterministic regression uses real SQLite: hold the first send inside asynchronous mention preparation, submit a second user input or parent notice, then release preparation. Expected: one initial command and persisted subsequent input, delivered through the existing steer/busy queue. Before the fix, both inputs dispatch. Separately, settle a synthetic competing-start refusal after stopping or pausing the winning thread; expect no lifecycle failure, failure notification, or automatic requeue. These cases fail on the pinned main and pass with the patch; 94 affected tests and server typecheck pass. This is fixture validation on macOS with Node 22.23.2 and pnpm 9.15.0, not a new live-provider reproduction. With the proposed test file present, run:
pnpm exec turbo run test --filter=@bb/server --force -- test/threads/thread-send-dispatch.test.ts
On unchanged main: 10 failed, 28 passed. With the seven-file patch: 38 passed in that suite. The synthetic refusal is Refusing to start a competing turn for thread "<thread-id>" while another turn is active or starting.
The enabled Provider retry plugin's overload/rate-limit retry does not cover these command refusals. Open #2639 addresses Codex turn-ID correlation; #3004 addresses ACP session-busy responses. Neither serializes server admission.
I have a contribution ready and would like contributor approval for this focused follow-up before opening a PR, as required by CONTRIBUTING.md.
Activity
pixexid commentedon Aug 25, 2026
Regression evidence: 386 archived session transcripts from 3 days of stable 0.39.0 operation under heavy inter-thread tell traffic contain ZERO occurrences of 'already processing a prompt' delivery errors. All 13 observed occurrences are from 2026-08-24 after switching to Nightly 0.39.1 (7e10ea4), across two threads. The failure shape is new in Nightly; stable's messaging defects were limited to steer-mode visibility. Suggests the auto-mode busy-detection/delivery path changed between 0.39.0 and 0.39.1-nightly.
brsbl commentedon Aug 25, 2026
Additional confirmed repro: UI steer during slow Claude Code startup
This same root cause reproduces from the app composer with Claude Code, not only from
bb thread tell --mode autowith pi. When the provider takes longer than the daemon's fixed five-second pending-start wait to publishturn/started, a steer sent from the UI is rejected, rendered asCommand turn.submit failed, marked as a generic run failure, and dropped even though the original turn starts moments later and completes normally.Versions and environment
0.39.1-nightly.32837442982.1, built from42d2c1bec2e9830bd8e2b8f5f355ebffda37bdedclaude-opus-5[1m]maincomparison:1f064e5a0b11d0a1e84b5fe6b3600ffc66ad9445thr_vaqgwzbtvm)Steps to reproduce
turn/started, submit a second prompt using the active-thread steer action.turn/started).This reproduced twice in the same real thread:
use real iconsrequested at 14:42:04;wait i need commentssteered at 14:42:19; steer rejected at 14:42:24; originalturn/startedarrived at 14:42:32. Event sequences 15222, 15224–15226, and 15230–15231.where are my commensrequested at 14:47:04;stop using inline html i'm in the specsteered at 14:47:10; steer rejected at 14:47:15; originalturn/startedarrived at 14:47:16. Event sequences 15307, 15309–15313.Actual error, verbatim:
Expected: preserve the second prompt and deliver it once the opening turn can accept a steer (or park it as a queued follow-up). The opening turn must remain active and healthy.
Actual: the second prompt is persisted as
client/turn/requested, then rejected after the fixed five-second wait, shown assystem/error, and never delivered. The original turn is not stuck: both observed original turns began after the rejection and completed normally.Root cause
thread.ts#L25-L31,thread.ts#L421-L455.turn.submitfailure as terminal: it appendsclient/turn/rejected, adds the visiblesystem/error, appliesrun.failedto the thread, and does not park the refused input:thread-lifecycle.ts#L770-L811.turn/started, so the failure row describes the steer command, not a failed provider turn. Treating it as a run failure creates the false error state and makes the message loss persistent.Current
mainstill codifies the first half of this behavior. The focused command below passes because the test expects the rejection verbatim:PR #2417 already implements the right shared fix for this exact case: classify the pending-start refusal as
thread_turn_busy, keep the live turn's status, suppress the misleading system error, and park the input for later delivery. This evidence broadens the confirmed impact from CLI + pi to the app composer + Claude Code; it does not require a separate issue.What this rules out
main; the remaining bounded five-second refusal is the trigger.Investigation thread: thr_sjgquuw76w
fix: park input the provider is too busy to take instead of failing t…
fix(host-daemon): wait out a starting turn and steer into it instead …
SawyerHood commentedon Aug 27, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2370.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
ryanbbrown commentedon Aug 28, 2026
This also matches a narrower delivery race seen with early follow-ups: a correction sent while a turn is starting can be refused or lost even though the recipient continues running. The important failure is not normal queue semantics; it is that BB accepts a plausible immediate-delivery path, then reports an error or loses the input while the live turn still owns the thread.
This issue is the right owner for busy or starting-turn delivery and recovery. It does not cover provider permission-mode discovery, intentional
queue/steerbehavior, or the separate request for file/stdin message input.fix: queue steers while turns start (#2816)
anluby commentedon Sep 3, 2026
Additional recurrence on stable 0.40.0: Claude overload extends the starting-turn race
This reproduced in the macOS desktop app with the Claude Code provider on stable bb 0.40.0.
Sequence
The second and third prompts were not delivered. After stopping the orphaned runtime, neither a normal tell nor edit-and-rerun could recover the request: bb reported that the thread was inactive and that the selected request had not been accepted into exactly one turn. Recovery therefore required continuing from the last completed turn in a fork.
Expected
This appears to be the same starting-turn delivery and recovery defect already tracked here, with provider overload making the race long enough to reach the watchdog.
ymichael commentedon Sep 4, 2026
Re-tested this against current
main. I can no longer reproduce the original auto/steer message-loss and false-error behavior.The relevant fixes are now covered by #2379, #2816, #2884, and #2886:
Messages sent while an opening turn has no turn ID are persisted and delivered in order.
Stale steer targets are handled safely.
A healthy provider turn is not marked failed.
I observed no automatic duplicate-delivery loop.
The later stable-0.40.0 report is consistent with behavior before these fixes landed.
There is a separate edge case: if the provider never starts the original request and the user stops the runtime, BB cannot explicitly retry that stored request. I explored that in #3030, but the resulting recovery experience was delayed, difficult to discover, and disproportionate to this issue. Users can resend after stopping; a dedicated recovery feature should only be revisited with a clear, persistent UI.
zacklavin11 commentedon Sep 6, 2026
A remaining server admission race related to this report reproduces on main at
accd5595926b080a1e17d1ea9b2fa2d7d0505ac6. This is narrower than the provider-busy handling proposed in closed #2417 and precedes the startup state addressed by merged #2816.Two sends can overlap during asynchronous preparation, both observe admission as available, and dispatch competing starts. An exact BB
command_failedcompeting-start refusal then reaches generic failure settlement, potentially losing pending delivery or marking the winning turn failed. Stopping or pausing the thread before the losing refusal arrives can also produce a false child-failure notice.Relevant current-main source:
A prepared seven-file server/test fix serializes preparation per thread and durably queues only narrowly recognized, unaccepted competing-start refusals. It preserves steering, existing startup waits, notification batching, and the daemon guard. Stop/pause prevents automatic requeue without letting a losing refusal fail the winner.
The deterministic regression uses real SQLite: hold the first send inside asynchronous mention preparation, submit a second user input or parent notice, then release preparation. Expected: one initial command and persisted subsequent input, delivered through the existing steer/busy queue. Before the fix, both inputs dispatch. Separately, settle a synthetic competing-start refusal after stopping or pausing the winning thread; expect no lifecycle failure, failure notification, or automatic requeue. These cases fail on the pinned main and pass with the patch; 94 affected tests and server typecheck pass. This is fixture validation on macOS with Node 22.23.2 and pnpm 9.15.0, not a new live-provider reproduction. With the proposed test file present, run:
On unchanged main: 10 failed, 28 passed. With the seven-file patch: 38 passed in that suite. The synthetic refusal is
Refusing to start a competing turn for thread "<thread-id>" while another turn is active or starting.The enabled Provider retry plugin's overload/rate-limit retry does not cover these command refusals. Open #2639 addresses Codex turn-ID correlation; #3004 addresses ACP session-busy responses. Neither serializes server admission.
I have a contribution ready and would like contributor approval for this focused follow-up before opening a PR, as required by CONTRIBUTING.md.