Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): preserve agent roster across chat pagination #12135

ClosedGigioxx(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/12135/headopened View on GitHub

Showing 2 changed files with 109 additions and 3 deletions.

x
0 of 2 viewed, 2 left
92 additions and 0 deletionsapps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.tsModified
View file
@@ -46,6 +46,7 @@
const encodeMessageContext = Schema.encodeEffect(
Schema.fromJsonString(OrchestrationMessageContext),
);
+const encodeActivityPayload = Schema.encodeSync(Schema.fromJsonString(Schema.Unknown));
​
it.effect("reads project shells without loading threads or resolving excluded projects", () => {
const resolved: string[] = [];
@@ -2868,6 +2869,97 @@
+ it.effect("preserves agent lifecycle outside the turn window and activity cap", () =>
+ Effect.gen(function* () {
+ yield* seedFanOutThread();
+ const query = yield* ProjectionSnapshotQuery;
+ const sql = yield* SqlClient.SqlClient;
+ const expectedIds: string[] = [];
+​
+ for (let index = 0; index < 17; index += 1) {
+ const taskId = `agent-${index}`;
+ const turnId = index < 8 ? "turn-1" : "turn-5";
+ const at = index < 8 ? "2026-03-01T00:00:30.000Z" : "2026-03-01T00:04:30.000Z";
+ for (const [offset, kind, payload] of [
+ [0, "task.started", { taskId, agentKind: "agent", title: taskId }],
+ [
+ 1,
+ "task.progress",
+ { taskId, agentKind: "agent", usageSnapshot: true, typedUsage: { totalTokens: 1000 } },