fix(background-agent): clean pendingNotifications on session.deleted

This commit is contained in:
YeonGyu-Kim
2026-02-27 03:00:39 +09:00
parent 485ef2476f
commit 16672bae16
2 changed files with 31 additions and 0 deletions
+9
View File
@@ -830,6 +830,8 @@ export class BackgroundManager {
tasksToCancel.set(descendant.id, descendant)
}
this.pendingNotifications.delete(sessionID)
if (tasksToCancel.size === 0) return
for (const task of tasksToCancel.values()) {
@@ -866,6 +868,13 @@ export class BackgroundManager {
subagentSessions.delete(task.sessionID)
}
}
for (const task of tasksToCancel.values()) {
if (task.parentSessionID) {
this.pendingNotifications.delete(task.parentSessionID)
}
}
SessionCategoryRegistry.remove(sessionID)
}