Description
What happened
t3_queue_reorder won't move a queued message ahead of any queued automatic completion delivery:
t3_queue_reorder({ threadId: "mcp:launch:870f4a9a-16a6-4ff8-a844-a7c824708e01:issue-dispatcher-v1",
queuedRunId: "…issue-dispatcher-v1:ordinal:4329", beforeRunId: "…issue-dispatcher-v1:ordinal:4223" })
→ orchestration_error: "Queued messages cannot be reordered ahead of automatic completion delivery."
(2026-10-26T18:32:03Z, from the parent thread 9b9ea64f-ecdf-4b2e-85aa-5346ab2a0197.) The Issue Triager had 111 runs queued behind a stuck run: delegated-task completions, scheduled ticks and webhooks. A rule correction sent with t3_thread_send (run 4329) couldn't be moved ahead of run 4223 (a queued delegated-task completion), so it would only run after every completion delivery queued before it. The other options are a steer, which needs a running turn, or cancelling the backlog.
Expected
A user or agent can move a queued message to the front, ahead of automatic completion deliveries. If the deliveries must keep their order among themselves, a message placed before them should still be allowed. If this stays refused, the error should say how to get a message in first.
Where
apps/server/src/orchestration-v2/Orchestrator.ts:8487-8496 (origin/main fe507c5a1e): beforeRunId pointing at an automatic completion run is rejected outright.
Activity
Dropje97 commentedon Nov 8, 2026
Same root cause seen without reorder: on a thread whose agent keeps delegating, every
t3_thread_sendwithmode: "queue"waited until a moment with no queued completion. In one night four such messages waited 44–68minutes while one to three later completions started ahead of each, until each was promoted to steer.
orchestrator-mcp-server.mddocuments
queueas "a separate follow-up run after active work" and does not mention the completion-firstpriority in
QueuedRunOrder.ts. A sentence there (and in thet3_queue/t3_thread_senddescriptions) would helpInvestigated by Claude Code (claude-opus-5-5) for the user; the event-log replay is in the user's local evidence.
juliusmarminge commentedon Nov 12, 2026
I tried to reproduce this on the current build and could not.
On origin/main dbfbe39 I added a test to apps/server/src/orchestration-v2/runtimeLayer.test.ts that runs the real OrchestratorV2 layer on SQLite. It creates a thread, starts a run, records an open delegated completion on that run and queues its completion message (delegatedCompletion set, created by the server), then queues a user message ('Rule correction'). It then dispatches queued-run.reorder { runId: correction, beforeRunId: completion }. On main the dispatch fails with OrchestratorDispatchError, cause 'Queued messages cannot be reordered ahead of automatic completion delivery.', the reporter's exact error. Command:
vp test run src/orchestration-v2/runtimeLayer.test.ts -t "moves a queued message ahead"from apps/server. I did not reproduce it in a running app. The dev Replay provider speaks generic ACP and cannot call delegate_task. Getting a completion queued, not steered, behind a busy parent would take a real provider and timing I cannot control. So this is reported as not reproduced in a real run, even though the same server code path fails in the test.Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.
Dropje97 commentedon Nov 12, 2026
Could this be reconsidered for the case in my November 8 comment? It does not involve reorder.
Rechecked on main
4fd40e1a16with the real SQLite runtime layer and a stub provider:t3_thread_sendwithmode: "queue", queues a ruling.The completion starts first and the earlier ruling stays queued.
QueuedRunOrder.tsranks automatic completions ahead of queue position and ordinal, and its unit test expects exactly that. On a coordinator thread with many children, every new completion overtakes the ruling again. Here four queued messages waited 44–68 minutes in one night, and builders acted on a reviewer's result before the ruling their coordinator had queued for it.Your test queues the completion before the correction and then checks that reorder is rejected, so it does not cover this order. Could a message that was queued before a completion keep its place, or could a sender mark a queued message to go ahead of completions?
Reproduction (appended to
runtimeLayer.test.ts; fails on main for both senders)Produced with Claude Code (Claude Opus 5.5), with Codex (gpt-6.1-sol) for research.
Dropje97 commentedon Nov 12, 2026
One more case of the same ordering, seen on a coordinator thread today, where the message that gets overtaken is the child's own report:
t3_thread_send, so the report is queued, and then the child ends its turn.The parent sees the child's turn end without the report, acts on that, and then handles the same event a second time when the report starts, 1–8 minutes after the notice and up to 25 minutes after the child sent it. On that one thread, 12 child messages today started after a completion notice that was queued later than they were; in several cases it was the notice for the same child's turn. A child's report cannot be meant to follow the notice of its own later turn end, so here the order is plainly wrong, not just a policy choice.
Produced with Claude Code (Claude Opus 5.5).