Skip to content

Commit c2df686

Browse files
t3dotggclaude
andcommitted
fix(server): a fork's history page loads its runs and attempts once
Co-Authored-By: Claude Fable 5.2 <[email protected]>
1 parent e0f884e commit c2df686

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/ProjectionStore.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6097,8 +6097,9 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
60976097
threadId: ThreadId,
60986098
includePersistentOutput = false,
60996099
) {
6100+
// The full index reads a fork's runs and attempts itself, so do not load them here first.
6101+
if (inheritedRunFork((yield* getThreadRecords(threadId, [])).thread) !== null) return null;
61006102
const records = yield* getThreadRecords(threadId, ["runs", "attempts"]);
6101-
if (inheritedRunFork(records.thread) !== null) return null;
61026103
const superseded = records.attempts.filter((attempt) => attempt.status === "superseded");
61036104
const stopRequests =
61046105
superseded.length === 0

0 commit comments

Comments
 (0)