Skip to content

Commit ef4c658

Browse files
DreightoClaude Code (claude-opus-5-5)claude
authored
fix(server): subagent threads no longer inherit a pending title job (#27990)
Co-authored-by: Claude Code (claude-opus-5-5) <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 4773ab7 commit ef4c658

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/SubagentProjection.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { assert, it } from "@effect/vitest";
22
import {
3+
CommandId,
34
type ModelSelection,
45
NodeId,
56
RunId,
@@ -82,7 +83,10 @@ function makeParentThread(): OrchestrationV2AppThread {
8283
}
8384

8485
it("keeps a subagent child awake when its parent thread is snoozed", () => {
85-
const parentThread = makeParentThread();
86+
const parentThread: OrchestrationV2AppThread = {
87+
...makeParentThread(),
88+
titleRegeneration: { requestId: CommandId.make("command:parent-title"), startedAt: snoozedAt },
89+
};
8690
const childProviderThreadId = ProviderThreadId.make("provider-thread:subagent-awake-child");
8791
const parentNodeId = NodeId.make("node:subagent-parent");
8892
const childThread = makeSubagentChildThread({
@@ -100,6 +104,7 @@ it("keeps a subagent child awake when its parent thread is snoozed", () => {
100104

101105
assert.isNull(childThread.snoozedUntil);
102106
assert.isNull(childThread.snoozedAt);
107+
assert.isNull(childThread.titleRegeneration);
103108
assert.equal(childThread.projectId, parentThread.projectId);
104109
assert.equal(childThread.runtimeMode, parentThread.runtimeMode);
105110
assert.equal(childThread.interactionMode, parentThread.interactionMode);

‎packages/provider-core/src/server/subagentProjection.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export function makeSubagentChildThread(input: {
6060
creationSource: input.creationSource,
6161
id: input.childThreadId,
6262
title: input.title,
63+
titleRegeneration: null,
6364
linkedPullRequest: null,
6465
pullRequests: [],
6566
historyOrigin: undefined,

0 commit comments

Comments
 (0)