Skip to content

Commit a8ac79c

Browse files
committed
fix(server): a failed parent read no longer runs the settle script for a subagent
1 parent 89ace68 commit a8ac79c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,11 @@ export const make = Effect.gen(function* () {
602602
thread.lineage.relationshipToParent === "subagent" &&
603603
thread.lineage.parentThreadId !== null
604604
) {
605-
const parent = yield* projections
606-
.getThread(thread.lineage.parentThreadId)
607-
.pipe(Effect.orElseSucceed(() => null));
605+
const parent = yield* projections.getThread(thread.lineage.parentThreadId).pipe(
606+
Effect.catchTags({
607+
ProjectionStoreThreadNotFoundError: () => Effect.succeed(null),
608+
}),
609+
);
608610
if (parent?.worktreePath === worktreePath) return;
609611
}
610612
const run = yield* projectScripts.runForThread({

0 commit comments

Comments
 (0)