From ec7ce51ea63dad1089adcceea1a603caa6b448e3 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 26 May 2026 01:30:10 +0900 Subject: [PATCH] fix(background-agent): debounce active parent wake flushes Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/features/background-agent/manager.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/features/background-agent/manager.ts b/src/features/background-agent/manager.ts index e13e58aae..7b3820a97 100644 --- a/src/features/background-agent/manager.ts +++ b/src/features/background-agent/manager.ts @@ -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,