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): restart note says how to resume a cut Claude subagent (#37266)
polarzero committed
Nov 18, 2026 at 14:27 UTC
f4b988aeafc44b3af2462d6cc0277f4fd2f60d3f
4 files changed
+31
-4
apps/server/src/orchestration-v2/RestartBackgroundNote.test.ts
+24
-1
@@ -141,7 +141,30 @@ it("names a lost subagent by the id the agent resumes it with", () => {
141
title: "Review",
142
nativeItemRef: { driver: "claudeAgent", nativeId: "agent-1", strength: "strong" },
143
} as never)?.label,
144
- "Review (id agent-1)",
144
+ "Review (id agent-1; resume it with SendMessage to 'agent-1')",
145
+ );
146
+ assert.equal(
147
+ cancelledTurnItemWork(
148
+ {
149
+ id: "item-2",
150
+ type: "subagent",
151
+ origin: "provider_native",
152
+ title: "Audit",
153
+ nativeItemRef: { driver: "codex", nativeId: "call_1:agent", strength: "strong" },
154
+ } as never,
155
+ "agent-thread",
156
+ )?.label,
157
+ "Audit (id agent-thread)",
158
+ );
159
+ assert.equal(
160
+ cancelledTurnItemWork({
161
+ id: "item-3",
162
+ type: "subagent",
163
+ origin: "provider_native",
164
+ title: "Lost",
165
+ nativeItemRef: { driver: "claudeAgent", nativeId: null, strength: "strong" },
166
+ } as never)?.label,
167
+ "Lost",
168
);
169
});
170
apps/server/src/orchestration-v2/RestartBackgroundNote.ts
+5
-1
@@ -51,7 +51,11 @@ export function cancelledTurnItemWork(
51
label: labelWithId(
52
compactLabel(item.title) === undefined ? item.prompt : item.title,
53
"subagent",
54
- nativeId === undefined ? "" : ` (id ${nativeId})`,
54
+ nativeId == null
55
+ ? ""
56
+ : item.nativeItemRef?.driver === "claudeAgent"
57
+ ? ` (id ${nativeId}; resume it with SendMessage to '${nativeId}')`
58
+ : ` (id ${nativeId})`,
59
),
60
id: item.id,
61
};
apps/server/src/orchestration-v2/testkit/OrchestratorReplayRecovery.integration.test.ts
+1
-1
@@ -139,7 +139,7 @@ const readClaudeCancelledSubagentResumeTranscript = Effect.fn(
139
...frame.message.message,
140
content: [
141
"Note: the T3 server restarted, and this background work was cancelled before it finished. It will not report back on its own, so resume or restart what you still need and wait for its result:",
142
- "- subagent: Audit src/math.ts (id a44c0ed810da9e4f3)",
142
+ "- subagent: Audit src/math.ts (id a44c0ed810da9e4f3; resume it with SendMessage to 'a44c0ed810da9e4f3')",
143
"",
144
"User message:",
145
frame.message.message.content,
apps/server/src/orchestration-v2/testkit/OrchestratorReplayRestartBackgroundNote.integration.test.ts
+1
-1
@@ -37,7 +37,7 @@ const FIRST_AFTER_RESTART = "Is the background subagent done yet?";
37
const SECOND_AFTER_RESTART = "Thanks. Anything else?";
38
const NOTE = [
39
"Note: the T3 server restarted, and this background work was cancelled before it finished. It will not report back on its own, so resume or restart what you still need and wait for its result:",
40
- "- subagent: Background subagent test (id a2995bfced8019363)",
40
+ "- subagent: Background subagent test (id a2995bfced8019363; resume it with SendMessage to 'a2995bfced8019363')",
41
].join("\n");
42
43
const readRestartTranscript = Effect.fn("readRestartTranscript")(function* (