fix: boulder continuation now respects /stop-continuation guard
Add isContinuationStopped check to atlas hook's session.idle handler so boulder continuation stops when user runs /stop-continuation. Previously, todo continuation and session recovery checked the guard, but boulder continuation did not — causing work to resume after stop. Fixes #1575
This commit is contained in:
@@ -399,6 +399,7 @@ const CONTINUATION_COOLDOWN_MS = 5000
|
||||
export interface AtlasHookOptions {
|
||||
directory: string
|
||||
backgroundManager?: BackgroundManager
|
||||
isContinuationStopped?: (sessionID: string) => boolean
|
||||
}
|
||||
|
||||
function isAbortError(error: unknown): boolean {
|
||||
@@ -573,6 +574,11 @@ export function createAtlasHook(
|
||||
return
|
||||
}
|
||||
|
||||
if (options?.isContinuationStopped?.(sessionID)) {
|
||||
log(`[${HOOK_NAME}] Skipped: continuation stopped for session`, { sessionID })
|
||||
return
|
||||
}
|
||||
|
||||
const requiredAgent = (boulderState.agent ?? "atlas").toLowerCase()
|
||||
const lastAgent = getLastAgentFromSession(sessionID)
|
||||
if (!lastAgent || lastAgent !== requiredAgent) {
|
||||
|
||||
Reference in New Issue
Block a user