Repository navigation
Stop promising a turn start for a message parked behind a run that failed - #7001
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sturn/starttimes out, or the 5-minute turn-start deadline from #6736 fires. The thread then goes toerror. 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. ButdescribeQueuedMessageWaitchose the row's label fromwaitingOnalone, 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, aturn-startingrow 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.QueuedMessagesListandLazyQueuedMessagesListpassthreadStatusto the row wait line and to the collapsed header's wait line.ThreadDetailPromptAreapassesthread.statusand 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:worktreewith real Codex. I froze the thread'scodex app-serverwithkill -STOP <pid>, sent one message (turn/starthangs), then a second (parked asturn-starting). After 30 s theturn/startrequest timed out (JSON-RPC request timed out: turn/start) and the thread went toerrorwith the second message still queued. I ran the same steps onorigin/mainand on this branch, both against the same data dir, in light mode.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.Tests:
queued-message-wait.test.tshas a new case for the erroredturn-startinglabel, and the list tests were updated for the new prop.vitest runonqueued-message-wait.test.ts,QueuedMessagesList.test.tsxandLazyQueuedMessagesList.test.tsxpasses: 3 files, 87 tests.pnpm exec turbo run typecheck --filter=@bb/apppasses. CI runs the full suites.🤖 Generated with Claude Code