@devries-cameron20 / t3code Mirror · read-only / commits / 5533151d77
Fork 0

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, 06:00 UTC

fix(server): delegated completion wakes name the child thread (#39297)

Julius Marminge committed Nov 19, 2026 at 11:37 UTC 5533151d779ca3969a5615381a5526712f0ebb14
2 files changed +12 -3
apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts
+9 -2
@@ -872,7 +872,14 @@ it.layer(layerTest)("delegated completion delivery repairs", (it) => {
872 runId,
873 nodeId: id,
874 occurredAt: now,
875 - payload: { ...task, id, result, status, title: "Inspect regression" },
875 + payload: {
876 + ...task,
877 + id,
878 + result,
879 + status,
880 + title: "Inspect regression",
881 + childThreadId: ThreadId.make(`thread:inline-budget-child:${id}`),
882 + },
883 })),
884 });
885 yield* orchestrator.dispatch({
@@ -898,7 +905,7 @@ it.layer(layerTest)("delegated completion delivery repairs", (it) => {
905 const deferredTaskId = testCase.inlineFirst ? secondTaskId : firstTaskId;
906 assert.include(
907 message.text,
901 - `Delegated task ${deferredTaskId} (Inspect regression) [${testCase.inlineFirst ? "cancelled" : "failed"}]`,
908 + `Delegated task ${deferredTaskId} (Inspect regression) in child thread thread:inline-budget-child:${deferredTaskId} [${testCase.inlineFirst ? "cancelled" : "failed"}]`,
909 );
910 assert.include(message.text, `Use task_status with taskId ${deferredTaskId}`);
911 assert.deepEqual(message.delegatedCompletion?.taskIds, [firstTaskId, secondTaskId]);
apps/server/src/orchestration-v2/Orchestrator.ts
+3 -1
@@ -953,7 +953,9 @@ function delegatedCompletionWakeDetail(
953 return taskIds
954 .map((taskId) => {
955 const task = tasks.find((candidate) => candidate.id === taskId);
956 - const label = `Delegated task ${taskId}${task?.title == null ? "" : ` (${task.title})`}${task === undefined ? " reached a terminal state" : ` [${task.status}]`}`;
956 + // A follow-up gets a fresh task id; the child thread links it to the task delegate_task returned.
957 + const thread = task?.childThreadId == null ? "" : ` in child thread ${task.childThreadId}`;
958 + const label = `Delegated task ${taskId}${task?.title == null ? "" : ` (${task.title})`}${thread}${task === undefined ? " reached a terminal state" : ` [${task.status}]`}`;
959 if (task?.result != null) {
960 const detail = `${label}:\n${task.result}`;
961 const bytes = Buffer.byteLength(detail);