fix(background-agent): preserve parent activity across idle events
Cubic caught that clearing recent parent activity on session.idle could reopen the stale-idle race. Keep the fresh activity marker until its normal expiry so background completions still defer while the parent turn is actively reasoning. Red: parent idle after fresh reasoning delta dispatched an unexpected parent wake. Green: focused parent-wake regression suite passes.
This commit is contained in:
@@ -1625,7 +1625,6 @@ The fallback retry session is now created and can be inspected directly.
|
||||
if (!props || typeof props !== "object") return
|
||||
const sessionID = resolveSessionEventID(props)
|
||||
if (sessionID) {
|
||||
this.parentWakeNotifier.clearParentSessionActivity(sessionID)
|
||||
void this.enqueueNotificationForParent(sessionID, () => this.flushPendingParentWake(sessionID)).catch((error) => {
|
||||
log("[background-agent] Failed to flush pending parent wake:", { sessionID, error })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user