@devries-cameron20 / t3code-1 / commits / 30f7600ec8
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(server): pinning a settled thread stamps its return to the active list (#29602)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Alex Southwell committed Nov 3, 2026 at 23:13 UTC 30f7600ec82ba0d85b71ee220e779c9a0dc9d62c
2 files changed +15
apps/server/src/orchestration-v2/Orchestrator.ts
+1
@@ -3559,6 +3559,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
3559 settledOverride:
3560 thread.settledOverride === "settled" ? "active" : thread.settledOverride,
3561 settledAt: thread.settledOverride === "settled" ? null : thread.settledAt,
3562 + ...(thread.settledOverride === "settled" ? { unsettledAt: now } : {}),
3563 snoozedUntil: null,
3564 snoozedAt: null,
3565 lastSnoozeWakeAt: thread.snoozedUntil == null ? thread.lastSnoozeWakeAt : now,
apps/server/src/orchestration-v2/runtimeLayer.test.ts
+14
@@ -2659,6 +2659,20 @@ it.layer(layerTest)("OrchestrationV2LayerLive lifecycle", (it) => {
2659 );
2660 assert.deepEqual(activeShell?.unsettledAt, activeProjection.thread.unsettledAt);
2661
2662 + yield* orchestrator.dispatch({
2663 + type: "thread.settle",
2664 + commandId: CommandId.make("runtime-layer-lifecycle-resettle"),
2665 + threadId,
2666 + });
2667 + yield* orchestrator.dispatch({
2668 + type: "thread.pin",
2669 + commandId: CommandId.make("runtime-layer-lifecycle-pin-settled"),
2670 + threadId,
2671 + });
2672 + const pinnedProjection = yield* orchestrator.getThreadProjection(threadId);
2673 + assert.equal(pinnedProjection.thread.settledOverride, "active");
2674 + assert.isNotNull(pinnedProjection.thread.unsettledAt);
2675 +
2676 const archive = yield* orchestrator.dispatch({
2677 type: "thread.archive",
2678 commandId: CommandId.make("runtime-layer-lifecycle-archive"),