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, 07:15 UTC
fix(server): explain how to send after a pending Merge back (#38873)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Yukun Shan committed
Nov 19, 2026 at 12:33 UTC
8695a7e5cf12e2984a312b3035debb01e22a7e7d
2 files changed
+22
-1
apps/server/src/orchestration-v2/Orchestrator.ts
+4
-1
@@ -8013,7 +8013,10 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
8013
return yield* new OrchestratorDispatchError({
8014
commandId: command.commandId,
8015
commandType: command.type,
8016
- cause: "A fresh session can't start while a fork or merge is still being applied.",
8016
+ cause:
8017
+ pendingMergeBackTransfer !== undefined
8018
+ ? "Send a message without /clear to apply the merged context first."
8019
+ : "A fresh session can't start while a fork or merge is still being applied.",
8020
});
8021
}
8022
const ordinal = nextRunOrdinal(projection);
apps/server/src/orchestration-v2/ThreadFork.execution.test.ts
+18
@@ -1424,6 +1424,24 @@ it.effect("merge-back rejects a second fork's context until the first is consume
1424
const second = yield* forkAndRun("second");
1425
1426
yield* mergeBack("merge-back-guard-first", first);
1427
+ const refusedFresh = yield* orchestrator
1428
+ .dispatch({
1429
+ type: "message.dispatch",
1430
+ commandId: CommandId.make("merge-back-guard-fresh-send"),
1431
+ threadId: parentId,
1432
+ messageId: MessageId.make("merge-back-guard-fresh-send"),
1433
+ text: "Start over",
1434
+ attachments: [],
1435
+ dispatchMode: { type: "start_immediately" },
1436
+ freshContext: true,
1437
+ createdBy: "user",
1438
+ creationSource: "web",
1439
+ })
1440
+ .pipe(Effect.flip);
1441
+ assert.include(
1442
+ String(refusedFresh.cause),
1443
+ "Send a message without /clear to apply the merged context first.",
1444
+ );
1445
const rejected = yield* mergeBack("merge-back-guard-second", second).pipe(Effect.flip);
1446
assert.include(String(rejected.cause), "pending context from another side chat or fork");
1447
yield* mergeBack("merge-back-guard-first-again", first);