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.
This commit is contained in:
parent
f727aab892
commit
fba916db60
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user