[Bug]: A message queued behind a running turn pushes the "Working for…" header below it #19736
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/web
Steps to reproduce#
- Start a turn that runs for a while (several tool calls).
- While it is still running, send a follow-up with the Queue behavior, so it shows the "Queued" marker.
- Look at the live thread before the queued message's own turn starts.
Expected behavior#
The "Working for …" header stays with the turn that is actually running, directly under the message that started it. The queued message sits after that turn's output and header, since it has not started yet.
Actual behavior#
The queued message is rendered with the "Queued" marker, and the "Working for …" header is rendered below it. The running turn's output appears above the queued message while the header that belongs to it appears underneath, so the output and the header look disconnected. The live tool row can also drop out, and a "thinking" row shows at the end of the thread instead.
Cause#
In apps/web/src/components/chat/MessagesTimeline.logic.ts, timelineEntryStartsResponse treats every user message other than steer and promoted_queued_to_steer as the start of a new response, including inputIntent === "queued_turn". lastResponseBoundaryIndex then returns the queued message, so activeTurnHeaderIndex points after it and the working header is placed below it. The queued message's runId is not the running run, so it should not move the header.
Impact#
Cosmetic issue
Version or commit#
upstream main, the logic is unchanged as of 9a01524f3f
Environment#
Desktop app, any provider
Related#
- #14566: a message queued during
/compactrenders above the compaction row (same area, different trigger) - #15279: steered messages render below "Worked for" (same function, different symptom)
Note
Responses generated with Claude (model: Claude Sonnet 5.5)
Note
Grok responding on behalf of Julius.
Confirmed on main (
9a01524f3f). This is a bug in the active-turn header placement, not intended behavior.In
apps/web/src/components/chat/MessagesTimeline.logic.ts,timelineEntryStartsResponseexcludes onlysteerandpromoted_queued_to_steer. Aqueued_turnuser message therefore counts as a response boundary as soon as it shows up in the timeline.activeTurnHeaderIndexis computed aslastResponseBoundaryIndex(timelineEntries) + 1, so while the earlier turn is still running, the "Working for…" header lands below the queued message instead of under the prompt that started the run.This isn't a duplicate. #15279 is about steers and
Worked forordering, and #14566 was the/compactqueue case. Both touch the same function, so a fix should keep those cases working.Workaround: none needed. It's cosmetic, and the layout corrects itself once the queued turn starts.
The idea in your follow-up looks reasonable: skip a
queued_turnboundary whoserunIdisn't the unsettled run. A PR with a test inMessagesTimeline.logic.test.tsis welcome.juliusmarminge added labelsaccepted
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
juliusmarminge added labelsneeds more info
juliusmarminge removed labelsneeds more info
Already addressed on current main by de34391427: queued prompts stay in the queue control until their run starts, rather than becoming timeline response boundaries.
Verified the real web app on Linux at a46f80ee28, using GPT-6-Astra with three sequential sleep tool calls. Queued one follow-up, then a second, and reloaded during the running turn. In each case, “Working for…” stayed under the original prompt and the running tool row remained above the queue.

Closing as already fixed.
juliusmarminge closed this
Sign in to join this conversation.
I have a small fix for this, tested locally but not opened as a PR. I'll open one if a maintainer wants it.
lastResponseBoundaryIndexnow skips aqueued_turnmessage whoserunIdis not the running run, so the "Working for …" header stays under the message that started the active turn. Once the queued run starts, itsrunIdmatches and it becomes the boundary as before.A regression test in
MessagesTimeline.logic.test.tscovers it: a running turn plus a queued message yieldsmessage, working, message, thinking. All 766 tests insrc/components/chatpass.Known gap: the live tool row can still drop out while a queued message is at the tail, because the trailing run of tool entries is broken by the message. A "thinking" row shows instead. That is not addressed here.
Note
Responses generated with Claude (model: Claude Sonnet 5.5)