fix(background-agent): debounce active parent wake flushes

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-26 01:30:10 +09:00
parent 6a561446ec
commit ec7ce51ea6
+8 -2
View File
@@ -2449,8 +2449,14 @@ The task was re-queued on a fallback model after a retryable failure.
const shouldDeferNotification = await this.isSessionActive(task.parentSessionId)
if (shouldDeferNotification) {
this.queuePendingParentWake(task.parentSessionId, notification, parentPromptContext, shouldReply)
log("[background-agent] Deferred notification until parent session is idle:", {
this.queuePendingParentWake(
task.parentSessionId,
notification,
parentPromptContext,
shouldReply,
PENDING_PARENT_WAKE_DEBOUNCE_MS,
)
log("[background-agent] Queued notification while parent session is active:", {
taskId: task.id,
allComplete,
isTaskFailure,