From 0d90bc136088b93e693ad4a74a104e7f3a96d6dc Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 8 Jan 2026 00:44:20 +0900 Subject: [PATCH] fix(sisyphus-orchestrator): check boulder session_ids before filtering sessions Bug: continuation was not triggered even when boulder.json existed with session_ids because the session filter ran BEFORE reading boulder state. Fix: Read boulder state first, then include boulder sessions in the allowed sessions for continuation. --- src/hooks/sisyphus-orchestrator/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/hooks/sisyphus-orchestrator/index.ts b/src/hooks/sisyphus-orchestrator/index.ts index 90f48e692..f3e197c2d 100644 --- a/src/hooks/sisyphus-orchestrator/index.ts +++ b/src/hooks/sisyphus-orchestrator/index.ts @@ -385,12 +385,17 @@ export function createSisyphusOrchestratorHook( log(`[${HOOK_NAME}] session.idle`, { sessionID }) + // Read boulder state FIRST to check if this session is part of an active boulder + const boulderState = readBoulderState(ctx.directory) + const isBoulderSession = boulderState?.session_ids.includes(sessionID) ?? false + const mainSessionID = getMainSessionID() const isMainSession = sessionID === mainSessionID const isBackgroundTaskSession = subagentSessions.has(sessionID) - if (mainSessionID && !isMainSession && !isBackgroundTaskSession) { - log(`[${HOOK_NAME}] Skipped: not main or background task session`, { sessionID }) + // Allow continuation if: main session OR background task OR boulder session + if (mainSessionID && !isMainSession && !isBackgroundTaskSession && !isBoulderSession) { + log(`[${HOOK_NAME}] Skipped: not main, background task, or boulder session`, { sessionID }) return } @@ -411,7 +416,7 @@ export function createSisyphusOrchestratorHook( return } - const boulderState = readBoulderState(ctx.directory) + if (!boulderState) { log(`[${HOOK_NAME}] No active boulder`, { sessionID }) return