The best way to control Claude Code, Codex and more from any computer or phone
fix(server): subagent threads no longer show the remote parent their parent was delegated from (#30334)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
spoukyii committed
Nov 14, 2026 at 15:09 UTC
c6aea18476db14af75834edb67f33cb22b0fa793
2 files changed
+11
-2
apps/server/src/orchestration-v2/SubagentProjection.test.ts
+8
-1
@@ -1,6 +1,7 @@
1
import { assert, it } from "@effect/vitest";
2
import {
3
CommandId,
4
+ EnvironmentId,
5
type ModelSelection,
6
NodeId,
7
RunId,
@@ -82,10 +83,15 @@ function makeParentThread(): OrchestrationV2AppThread {
83
};
84
}
85
85
-it("keeps a subagent child awake when its parent thread is snoozed", () => {
86
+it("resets a subagent child's snooze, title job and remote delegation but keeps its workspace", () => {
87
const parentThread: OrchestrationV2AppThread = {
88
...makeParentThread(),
89
titleRegeneration: { requestId: CommandId.make("command:parent-title"), startedAt: snoozedAt },
90
+ delegatedFrom: {
91
+ environmentId: EnvironmentId.make("linked-environment"),
92
+ threadId: ThreadId.make("linked-parent"),
93
+ title: "Linked parent",
94
+ },
95
};
96
const childProviderThreadId = ProviderThreadId.make("provider-thread:subagent-awake-child");
97
const parentNodeId = NodeId.make("node:subagent-parent");
@@ -105,6 +111,7 @@ it("keeps a subagent child awake when its parent thread is snoozed", () => {
111
assert.isNull(childThread.snoozedUntil);
112
assert.isNull(childThread.snoozedAt);
113
assert.isNull(childThread.titleRegeneration);
114
+ assert.isUndefined(childThread.delegatedFrom);
115
assert.equal(childThread.projectId, parentThread.projectId);
116
assert.equal(childThread.runtimeMode, parentThread.runtimeMode);
117
assert.equal(childThread.interactionMode, parentThread.interactionMode);
packages/provider-core/src/server/subagentProjection.ts
+3
-1
@@ -61,8 +61,10 @@ export function makeSubagentChildThread(input: {
61
readonly createdBy: OrchestrationV2Actor;
62
readonly creationSource: OrchestrationV2CreationSource;
63
}): OrchestrationV2AppThread {
64
+ // The remote parent delegated the parent thread, not its subagents.
65
+ const { delegatedFrom: _delegatedFrom, ...inherited } = input.parentThread;
66
return {
65
- ...input.parentThread,
67
+ ...inherited,
68
createdBy: input.createdBy,
69
creationSource: input.creationSource,
70
id: input.childThreadId,