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
|
state.lastContinuationInjectedAt = now
|
||||||
const remaining = progress.total - progress.completed
|
const remaining = progress.total - progress.completed
|
||||||
injectBoulderContinuation({
|
try {
|
||||||
ctx,
|
await injectBoulderContinuation({
|
||||||
sessionID,
|
ctx,
|
||||||
planName: boulderState.plan_name,
|
sessionID,
|
||||||
remaining,
|
planName: boulderState.plan_name,
|
||||||
total: progress.total,
|
remaining,
|
||||||
agent: boulderState.agent,
|
total: progress.total,
|
||||||
backgroundManager,
|
agent: boulderState.agent,
|
||||||
sessionState: state,
|
backgroundManager,
|
||||||
})
|
sessionState: state,
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
log(`[${HOOK_NAME}] Failed to inject boulder continuation`, { sessionID, error: err })
|
||||||
|
state.promptFailureCount++
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user