Skip to content

Commit fba916d

Browse files
committed
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.
1 parent f727aab commit fba916d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/hooks/atlas/event-handler.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,21 @@ export function createAtlasEventHandler(input: {
122122

123123
state.lastContinuationInjectedAt = now
124124
const remaining = progress.total - progress.completed
125-
injectBoulderContinuation({
126-
ctx,
127-
sessionID,
128-
planName: boulderState.plan_name,
129-
remaining,
130-
total: progress.total,
131-
agent: boulderState.agent,
132-
backgroundManager,
133-
sessionState: state,
134-
})
125+
try {
126+
await injectBoulderContinuation({
127+
ctx,
128+
sessionID,
129+
planName: boulderState.plan_name,
130+
remaining,
131+
total: progress.total,
132+
agent: boulderState.agent,
133+
backgroundManager,
134+
sessionState: state,
135+
})
136+
} catch (err) {
137+
log(`[${HOOK_NAME}] Failed to inject boulder continuation`, { sessionID, error: err })
138+
state.promptFailureCount++
139+
}
135140
return
136141
}
137142

0 commit comments

Comments
 (0)