From 95a072db915ad973132a49149098e16c5c9ad690 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 25 Nov 2026 06:25:54 +0000 Subject: [PATCH 1/2] test(server): unmatched t3_background_wait error names Workflow IDs Fails on main: the message lists Subagent, Agent tool and delegate_task IDs but not Workflow, so agents conclude workflows cannot be waited on (#42655). Co-Authored-By: Claude Opus 5.5 --- .../src/orchestration-v2/ThreadManagementService.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/server/src/orchestration-v2/ThreadManagementService.test.ts b/apps/server/src/orchestration-v2/ThreadManagementService.test.ts index 631f9089049c..0b9450c7c0fe 100644 --- a/apps/server/src/orchestration-v2/ThreadManagementService.test.ts +++ b/apps/server/src/orchestration-v2/ThreadManagementService.test.ts @@ -847,6 +847,14 @@ it.effect.each([ }), ); +it("an unmatched background wait says Workflow IDs already keep the thread working", () => { + const error = new ThreadManagementService.ThreadManagementBackgroundWaitError({ + threadId: ThreadId.make("thread:thread-management:background-wait"), + reason: "unmatched", + }); + expect(error.message).toContain("Workflow"); +}); + it.effect.each([ { status: "completed" as const, followUp: "none", settles: true }, { status: "failed" as const, followUp: "none", settles: false }, From e8593ef4ae85d328a7c5685a64df1aa7e96d184f Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 25 Nov 2026 06:30:01 +0000 Subject: [PATCH 2/2] fix(server): t3_background_wait error says Workflow runs already keep the thread working A Workflow task ID passed to t3_background_wait never matches a background command, so the agent gets the 'unmatched' error. That error listed only Subagent, Agent tool and delegate_task IDs as not belonging there, and agents concluded workflows could not be waited on. Name Workflow too, and say these runs already keep the thread working until they finish (#42655). Co-Authored-By: Claude Opus 5.5 --- apps/server/src/orchestration-v2/ThreadManagementService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/orchestration-v2/ThreadManagementService.ts b/apps/server/src/orchestration-v2/ThreadManagementService.ts index e3bc51179ed1..a928d46a1764 100644 --- a/apps/server/src/orchestration-v2/ThreadManagementService.ts +++ b/apps/server/src/orchestration-v2/ThreadManagementService.ts @@ -393,7 +393,7 @@ export class ThreadManagementBackgroundWaitError extends Schema.TaggedError