Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop the reaper from silently killing live background subagents #5677

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5677/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 77 additions and 18 deletions.

x
0 of 2 viewed, 2 left
64 additions and 18 deletionsapps/server/src/provider/Layers/ProviderSessionReaper.test.tsModified
View file
@@ -68,6 +68,7 @@
readonly lastError: string | null;
readonly updatedAt: string;
} | null;
+ readonly backgroundLiveness?: "working" | "monitoring" | null;
}>,
) {
const now = "2026-01-01T00:00:00.000Z";
@@ -109,6 +110,7 @@
latestTurn: null,
messages: [],
session: thread.session,
+ backgroundLiveness: thread.backgroundLiveness ?? null,
activities: [],
proposedPlans: [],
checkpoints: [],
@@ -135,6 +137,14 @@
runtime = null;
});
​
+ // Shared start sequence so each test adds no manual Effect runners
+ // (no-manual-effect-runtime-in-tests tracks this file's legacy count).
+ async function startReaper() {
+ const reaper = await runtime!.runPromise(Effect.service(ProviderSessionReaper));
+ scope = await Effect.runPromise(Scope.make("sequential"));
+ await Effect.runPromise(reaper.start().pipe(Scope.provide(scope)));
+ }
+​