From 44675fb57f77d5ae50527123e0ebe13413779b17 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 10 Feb 2026 11:16:19 +0900 Subject: [PATCH] fix(atlas): allow boulder continuation for Sisyphus sessions When boulderState.agent is not explicitly set (defaults to 'atlas'), allow continuation for sessions where the last agent is 'sisyphus'. This fixes the issue where boulder continuation was skipped when Sisyphus took over the conversation after boulder creation. --- src/hooks/atlas/event-handler.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hooks/atlas/event-handler.ts b/src/hooks/atlas/event-handler.ts index a9d26a32..f9024776 100644 --- a/src/hooks/atlas/event-handler.ts +++ b/src/hooks/atlas/event-handler.ts @@ -89,13 +89,20 @@ export function createAtlasEventHandler(input: { return } - const requiredAgent = (boulderState.agent ?? "atlas").toLowerCase() const lastAgent = getLastAgentFromSession(sessionID) - if (!lastAgent || lastAgent !== requiredAgent) { + const requiredAgent = (boulderState.agent ?? "atlas").toLowerCase() + const lastAgentMatchesRequired = lastAgent === requiredAgent + const boulderAgentWasNotExplicitlySet = boulderState.agent === undefined + const boulderAgentDefaultsToAtlas = requiredAgent === "atlas" + const lastAgentIsSisyphus = lastAgent === "sisyphus" + const allowSisyphusWhenDefaultAtlas = boulderAgentWasNotExplicitlySet && boulderAgentDefaultsToAtlas && lastAgentIsSisyphus + const agentMatches = lastAgentMatchesRequired || allowSisyphusWhenDefaultAtlas + if (!agentMatches) { log(`[${HOOK_NAME}] Skipped: last agent does not match boulder agent`, { sessionID, lastAgent: lastAgent ?? "unknown", requiredAgent, + boulderAgentExplicitlySet: boulderState.agent !== undefined, }) return }