@devries-cameron20 / t3code Mirror · read-only / commits / 5bb50dca8e
Fork 0

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 22, 08:15 UTC

fix(server): restart continuation checks before repeating side effects (#27836)

xlurie committed Nov 1, 2026 at 04:42 UTC 5bb50dca8e3f0935d8c33dbeefff64217f729b2b
2 files changed +8 -3
apps/server/src/orchestration-v2/RestartContinuation.test.ts
+6 -2
@@ -915,7 +915,9 @@ it.effect("continues a cut run past queued follow-ups, which stay held", () =>
915 ...cut,
916 runs: [...cut.runs, queuedFollowUp],
917 } as unknown as OrchestrationV2ThreadProjection);
918 - assert.deepEqual(texts, ["Continue where you left off."]);
918 + assert.deepEqual(texts, [
919 + "Continue where you left off. Your last turn was cut short, so a command or other action it started may have finished or may still be running. Before you repeat one that changes state, confirm it did not take effect and is not still running; if you cannot tell, say so instead of repeating it.",
920 + ]);
921 }),
922 );
923
@@ -945,7 +947,9 @@ it.effect("continues a resumed queued run that ran after an earlier continuation
947 ...cut,
948 runs: [...cut.runs, finishedContinuation],
949 } as unknown as OrchestrationV2ThreadProjection);
948 - assert.deepEqual(texts, ["Continue where you left off."]);
950 + assert.deepEqual(texts, [
951 + "Continue where you left off. Your last turn was cut short, so a command or other action it started may have finished or may still be running. Before you repeat one that changes state, confirm it did not take effect and is not still running; if you cannot tell, say so instead of repeating it.",
952 + ]);
953 }),
954 );
955
apps/server/src/orchestration-v2/RestartContinuation.ts
+2 -1
@@ -30,7 +30,8 @@ import {
30 restartContinuationNote,
31 } from "./RestartBackgroundNote.ts";
32
33 -const CONTINUE_PROMPT = "Continue where you left off.";
33 +const CONTINUE_PROMPT =
34 + "Continue where you left off. Your last turn was cut short, so a command or other action it started may have finished or may still be running. Before you repeat one that changes state, confirm it did not take effect and is not still running; if you cannot tell, say so instead of repeating it.";
35
36 const MAX_CONTINUATION_CHAIN = 3;
37 const CONTINUATION_LOOP_WINDOW_MS = 5 * 60 * 1_000;