From fba916db6081cc612602b31ef368339a0ead2418 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 11 Feb 2026 00:45:10 +0900 Subject: [PATCH] fix(atlas): await injectBoulderContinuation and handle errors The async call was fire-and-forget with no error handling. Now properly awaited with try/catch that logs failures and increments promptFailureCount. --- src/hooks/atlas/event-handler.ts | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/hooks/atlas/event-handler.ts b/src/hooks/atlas/event-handler.ts index 8e57aea8..4d33b7da 100644 --- a/src/hooks/atlas/event-handler.ts +++ b/src/hooks/atlas/event-handler.ts @@ -122,16 +122,21 @@ export function createAtlasEventHandler(input: { state.lastContinuationInjectedAt = now const remaining = progress.total - progress.completed - injectBoulderContinuation({ - ctx, - sessionID, - planName: boulderState.plan_name, - remaining, - total: progress.total, - agent: boulderState.agent, - backgroundManager, - sessionState: state, - }) + try { + await injectBoulderContinuation({ + ctx, + sessionID, + planName: boulderState.plan_name, + remaining, + total: progress.total, + agent: boulderState.agent, + backgroundManager, + sessionState: state, + }) + } catch (err) { + log(`[${HOOK_NAME}] Failed to inject boulder continuation`, { sessionID, error: err }) + state.promptFailureCount++ + } return }