diff --git a/packages/runner/src/hook.ts b/packages/runner/src/hook.ts index 58e84e44..6ed21ee2 100644 --- a/packages/runner/src/hook.ts +++ b/packages/runner/src/hook.ts @@ -201,8 +201,8 @@ async function turnEnd(db: Db, s: SessionView, text: string | null, canContinue: return null; } const [task] = await db.select().from(tasks).where(eq(tasks.id, s.taskId)); - // PEP-10: the story left work (done, back in the backlog) — a queue runner waits for the next one. - if (task && (task.status === "done" || task.status === "backlog")) { + // PEP-10: the story is done — a queue runner waits for its next one without a ping. + if (task?.status === "done") { await updateSession(db, s.id, { status: "idle", lastActivityAt: new Date() }); return null; }