Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Claude publishes each background roster change once #34952

OpenVantrongs(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/34952/headopened View on GitHub

Showing 2 changed files with 164 additions and 26 deletions.

x
0 of 2 viewed, 2 left
101 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -14752,6 +14752,107 @@
+ it.effect("publishes each background roster change once", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const harness = yield* makeWakeHarness;
+ const roster = (
+ tasks: ReadonlyArray<{ readonly task_id: string; readonly task_type: string }>,
+ uuid: string,
+ ) =>
+ claudeSdkFrame({
+ type: "system",
+ subtype: "background_tasks_changed",
+ tasks: tasks.map((task) => ({ ...task, description: WAKE_TASK_DESCRIPTION })),
+ uuid,
+ session_id: WAKE_NATIVE_SESSION,
+ });
+ const shell = { task_id: WAKE_TASK_ID, task_type: "local_bash" };
+ const subagent = { task_id: "a1a715b7d0bdfefea", task_type: "local_agent" };
+​
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now: yield* DateTime.now,
+ attemptId: RunAttemptId.make("attempt-claude-roster-once"),
+ text: "Run the build in the background, then review the diff in a subagent.",
+ attachments: [],