fix(background-agent): re-enqueue parent wake on same-source reservation instead of dropping

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-20 13:01:31 +09:00
parent ee8b80a5e2
commit 11d2cfb8a8
@@ -224,9 +224,9 @@ export class ParentWakeNotifier {
throw promptResult.error
}
if (promptResult.status === "reserved" && promptResult.reservedBy === "background-agent-parent-wake") {
log("[background-agent] Ignored duplicate parent wake flush already reserved by promptAsync gate:", {
sessionID,
})
this.requeueWake(sessionID, latestWake)
this.schedulePendingParentWakeFlush(sessionID, 2_000)
log("[background-agent] Requeued parent wake flush reserved by promptAsync gate hold:", { sessionID })
return
}
if (!isInternalPromptDispatchAccepted(promptResult)) {