Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): preserve background replies across provider handoffs #32508

Closedvoltcrash(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/32508/headopened View on GitHub

Showing 11 changed files with 26 additions and 8 deletions (loading 9).

x
0 of 11 viewed, 11 left
15 additions and 7 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -12178,7 +12178,7 @@
it.effect(
- "uses task_started as an incremental roster fallback, keeps its tool call, and clears internal work on empty snapshot",
+ "uses task_started as an incremental roster fallback and keeps its owed wake after an empty snapshot",
Effect.gen(function* () {
const harness = yield* makeWakeHarness;
@@ -12326,7 +12326,7 @@
).map((task) => task.taskId),
WAKE_TASK_ID,
- assert.isFalse(yield* harness.hasPendingBackgroundWork);
+ assert.isTrue(yield* harness.hasPendingBackgroundWork);
}).pipe(
Effect.provide(
Layer.mergeAll(
@@ -15413,9 +15413,18 @@
assert.isTrue(yield* harness.hasPendingBackgroundWork);
assert.lengthOf(harness.continuationRequests, 0);
+ yield* harness.offerAndWait(
+ claudeSdkFrame({
+ type: "system",
+ subtype: "background_tasks_changed",
+ tasks: [],
+ uuid: "roster-before-notification",