The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 12:15 UTC
fix(server): resuming a queue no longer bypasses failed worktree setup (#36616)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT 6.1 Sol <codex@openai.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Wout Stiens committed
Nov 15, 2026 at 05:56 UTC
3209fa9534f0d8cc0213963d6dfdb11522bde3d2
2 files changed
+16
apps/server/src/orchestration-v2/Orchestrator.ts
+7
@@ -15217,6 +15217,13 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
15217
cause: "Continue the limited thread before resuming its queue.",
15218
});
15219
}
15220
+ if (worktreeSetupPending(projection)) {
15221
+ return yield* new OrchestratorDispatchError({
15222
+ commandId: command.commandId,
15223
+ commandType: command.type,
15224
+ cause: "Retry worktree setup or choose a workspace before resuming the queue.",
15225
+ });
15226
+ }
15227
const now = yield* DateTime.now;
15228
const queued = projection.runs.filter((run) => run.status === "queued");
15229
for (const run of queued) {
apps/server/src/orchestration-v2/runtimeLayer.test.ts
+9
@@ -7996,6 +7996,15 @@ it.layer(layerTest)("OrchestrationV2LayerLive lifecycle", (it) => {
7996
yield* witness.end("active", "completed");
7997
assert.equal(yield* Queue.take(witness.startedRunIds), (yield* witness.runFor("queued")).id);
7998
assert.isTrue((yield* dispatcher.runFor("issue")).queueHeld);
7999
+ const resume = yield* orchestrator
8000
+ .dispatch({
8001
+ type: "queue.resume",
8002
+ commandId: CommandId.make(`${dispatcherId}:resume`),
8003
+ threadId: dispatcherId,
8004
+ })
8005
+ .pipe(Effect.flip);
8006
+ assert.include(String(resume.cause), "Retry worktree setup");
8007
+ assert.isTrue((yield* dispatcher.runFor("issue")).queueHeld);
8008
}),
8009
);
8010