Skip to content

Commit c56713a

Browse files
vitalyiegorovclaude
andcommitted
fix(server): goal commands stay on the provider they were checked against
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a65a1d4 commit c56713a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/server/src/orchestration-v2/Orchestrator.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5479,12 +5479,12 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
54795479
(command.creationSource === "web" || command.creationSource === "mobile") &&
54805480
command.scheduledTaskId === undefined;
54815481
// A queued pick reaches the thread only when its run starts; unpicked messages behind it follow it.
5482-
// Monitor updates follow whatever runs before them, and a goal stop runs ahead of the queue.
5482+
// Monitor updates follow whatever runs before them; goal commands stay on the provider validated above.
54835483
const newestQueuedPick =
54845484
shouldQueue &&
54855485
sentByUserFromClient &&
54865486
command.modelSelection === undefined &&
5487-
goalStopRunId === undefined
5487+
parsedGoalCommand === null
54885488
? queuedRunsInDeliveryOrder(projection).findLast(
54895489
(run) =>
54905490
!followsCurrentConversation(

0 commit comments

Comments
 (0)