The best way to control Claude Code, Codex and more from any computer or phone
fix(server): forks no longer inherit pending title regeneration (#24014)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Victor Vogel committed
Oct 30, 2026 at 16:01 UTC
7f005d4d8d5b6226fad707b0e5f679fa391bf46f
2 files changed
+21
apps/server/src/orchestration-v2/ThreadForkService.test.ts
+19
@@ -1,5 +1,6 @@
1
import { assert, it } from "@effect/vitest";
2
import {
3
+ CommandId,
4
ContextTransferId,
5
MessageId,
6
type ModelSelection,
@@ -159,6 +160,24 @@ it.effect("keeps a fork awake when its source thread is snoozed", () =>
160
}),
161
);
162
163
+it.effect("starts a fork without the source thread's pending title regeneration", () =>
164
+ Effect.gen(function* () {
165
+ const sourceRun = makeSourceRun("completed");
166
+ const titleRegeneration = {
167
+ requestId: CommandId.make("command:fork-source-title"),
168
+ startedAt: snoozedAt,
169
+ };
170
+ const sourceProjection = {
171
+ ...makeSourceProjection(sourceRun),
172
+ thread: { ...makeSourceThread(), titleRegeneration },
173
+ };
174
+ const result = yield* planFork(sourceRun, sourceProjection);
175
+
176
+ assert.isNull(result.targetThread.titleRegeneration);
177
+ assert.deepEqual(sourceProjection.thread.titleRegeneration, titleRegeneration);
178
+ }),
179
+);
180
+
181
it.effect("preserves pull request context without inheriting any watches", () =>
182
Effect.gen(function* () {
183
const sourceRun = makeSourceRun("completed");
apps/server/src/orchestration-v2/ThreadForkService.ts
+2
@@ -90,6 +90,8 @@ export const layer: Layer.Layer<ThreadForkServiceV2> = Layer.succeed(
90
creationSource: input.creationSource,
91
id: input.targetThreadId,
92
title: input.title ?? `${input.sourceProjection.thread.title} fork`,
93
+ // The source's title job completes only on the source thread.
94
+ titleRegeneration: null,
95
activeProviderThreadId: null,
96
lineage: {
97
parentThreadId: input.sourceProjection.thread.id,