Skip to content

Stop promising a turn start for a message parked behind a run that failed - #7001

Merged
ymichael merged 2 commits into
mainfrom
bb/turn-didnt-start-queue-label
Nov 4, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/turn-didnt-start-queue-label

Conversation

@ymichael

@ymichael ymichael commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

A steer sent while a turn is starting is parked in the queue as turn-starting. If the provider never starts that turn, the run fails: Codex's turn/start times out, or the 5-minute turn-start deadline from #6736 fires. The thread then goes to error. The parked row correctly stays queued. It goes out with the next turn, which starts either when the user sends another message or when the provider recovers and starts the turn that timed out. But describeQueuedMessageWait chose the row's label from waitingOn alone, so on the errored thread it kept saying "Waiting for turn to start" after that start had already failed.

What changed

  • apps/app/src/lib/queued-message-wait.ts: the label function now takes the thread status. On an errored thread, a turn-starting row reads "Turn didn't start · sends on the next turn". This covers both ways the next turn can start, and it fits the collapsed queue header at 390 px without truncation. The label is unchanged in every other state.
  • QueuedMessagesList and LazyQueuedMessagesList pass threadStatus to the row wait line and to the collapsed header's wait line.
  • ThreadDetailPromptArea passes thread.status and adds it to the memo dependencies, so the label changes while the thread is open, without a reload.

This is app-only: no wire, protocol, CLI or SDK changes.

How you verified

Live, pnpm start:worktree with real Codex. I froze the thread's codex app-server with kill -STOP <pid>, sent one message (turn/start hangs), then a second (parked as turn-starting). After 30 s the turn/start request timed out (JSON-RPC request timed out: turn/start) and the thread went to error with the second message still queued. I ran the same steps on origin/main and on this branch, both against the same data dir, in light mode.

  • Before (main): the errored thread's queue row still says "Waiting for turn to start".
  • After (this branch): the page stayed open from the active state through the error, with no reload. The row changed from "Waiting for turn to start" to "Turn didn't start · sends on the next turn". After kill -CONT <pid>, Codex started the timed-out turn with no new message, and the parked steer joined it, was answered, and left the queue empty. The first version of this branch said "sends with your next message". Two things showed that was wrong: the text was cut off in the 390 px header, and on resume the steer went out about 4 s before my next message.
Desktop (1440) Phone (390)
Before
After

Tests: queued-message-wait.test.ts has a new case for the errored turn-starting label, and the list tests were updated for the new prop. vitest run on queued-message-wait.test.ts, QueuedMessagesList.test.tsx and LazyQueuedMessagesList.test.tsx passes: 3 files, 87 tests. pnpm exec turbo run typecheck --filter=@bb/app passes. CI runs the full suites.

🤖 Generated with Claude Code

AGENT GENERATED

ymichael and others added 2 commits November 3, 2026 20:20
…iled

A steer sent while a turn is starting is parked as `turn-starting`. When
the provider never starts that turn, the run fails (the 5-minute deadline
from #6736, or a timed-out `turn/start`) and the thread goes to error. The
row correctly stays queued, but its label still read "Waiting for turn to
start". On an errored thread it now reads "Turn didn't start · sends with
your next message", which is what happens: the next message starts a turn
and the parked steer joins it.

The queue list now receives the thread status. It is also added to the
prompt area's memo dependencies so the label changes while the thread is
open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The turn can also start without a new message: when the provider recovers
it starts the timed-out turn and the parked steer joins it. The shorter
label also fits the collapsed queue header at phone width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael added a commit that referenced this pull request Nov 4, 2026
@ymichael
ymichael merged commit 298e5d0 into main Nov 4, 2026
32 checks passed
@ymichael
ymichael deleted the bb/turn-didnt-start-queue-label branch November 4, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant