From 08957ce1f05d0b5fb85416edf6de63114738405e Mon Sep 17 00:00:00 2001 From: Darin <86675935+darinkishore@users.noreply.github.com> Date: Sun, 21 Dec 2025 18:40:16 -0800 Subject: [PATCH] fix: allow multiple todo continuations per session (#164) Previously, remindedSessions was only cleared when assistant finished with finish=true. If agent stopped mid-task (ESC, error), the session stayed 'reminded' forever, preventing future continuations. Now also clears remindedSessions when user sends a new message, allowing continuation to trigger again after user interaction. --- src/hooks/todo-continuation-enforcer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/todo-continuation-enforcer.ts b/src/hooks/todo-continuation-enforcer.ts index ac0f11b..26cdde7 100644 --- a/src/hooks/todo-continuation-enforcer.ts +++ b/src/hooks/todo-continuation-enforcer.ts @@ -279,6 +279,8 @@ export function createTodoContinuationEnforcer(ctx: PluginInput): TodoContinuati pendingCountdowns.delete(sessionID) log(`[${HOOK_NAME}] Cancelled countdown on user message`, { sessionID }) } + // Allow new continuation after user sends another message + remindedSessions.delete(sessionID) } if (sessionID && role === "assistant" && finish) {