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.
This commit is contained in:
parent
69a12663c4
commit
0d90bc1360
@ -385,12 +385,17 @@ export function createSisyphusOrchestratorHook(
|
|||||||
|
|
||||||
log(`[${HOOK_NAME}] session.idle`, { sessionID })
|
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 mainSessionID = getMainSessionID()
|
||||||
const isMainSession = sessionID === mainSessionID
|
const isMainSession = sessionID === mainSessionID
|
||||||
const isBackgroundTaskSession = subagentSessions.has(sessionID)
|
const isBackgroundTaskSession = subagentSessions.has(sessionID)
|
||||||
|
|
||||||
if (mainSessionID && !isMainSession && !isBackgroundTaskSession) {
|
// Allow continuation if: main session OR background task OR boulder session
|
||||||
log(`[${HOOK_NAME}] Skipped: not main or background task session`, { sessionID })
|
if (mainSessionID && !isMainSession && !isBackgroundTaskSession && !isBoulderSession) {
|
||||||
|
log(`[${HOOK_NAME}] Skipped: not main, background task, or boulder session`, { sessionID })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,7 +416,7 @@ export function createSisyphusOrchestratorHook(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const boulderState = readBoulderState(ctx.directory)
|
|
||||||
if (!boulderState) {
|
if (!boulderState) {
|
||||||
log(`[${HOOK_NAME}] No active boulder`, { sessionID })
|
log(`[${HOOK_NAME}] No active boulder`, { sessionID })
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user