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:
@@ -2449,8 +2449,14 @@ The task was re-queued on a fallback model after a retryable failure.
|
|||||||
const shouldDeferNotification = await this.isSessionActive(task.parentSessionId)
|
const shouldDeferNotification = await this.isSessionActive(task.parentSessionId)
|
||||||
|
|
||||||
if (shouldDeferNotification) {
|
if (shouldDeferNotification) {
|
||||||
this.queuePendingParentWake(task.parentSessionId, notification, parentPromptContext, shouldReply)
|
this.queuePendingParentWake(
|
||||||
log("[background-agent] Deferred notification until parent session is idle:", {
|
task.parentSessionId,
|
||||||
|
notification,
|
||||||
|
parentPromptContext,
|
||||||
|
shouldReply,
|
||||||
|
PENDING_PARENT_WAKE_DEBOUNCE_MS,
|
||||||
|
)
|
||||||
|
log("[background-agent] Queued notification while parent session is active:", {
|
||||||
taskId: task.id,
|
taskId: task.id,
|
||||||
allComplete,
|
allComplete,
|
||||||
isTaskFailure,
|
isTaskFailure,
|
||||||
|
|||||||
Reference in New Issue
Block a user