Skip to content

Commit 08957ce

Browse files
authored
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.
1 parent d4c66e3 commit 08957ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hooks/todo-continuation-enforcer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ export function createTodoContinuationEnforcer(ctx: PluginInput): TodoContinuati
279279
pendingCountdowns.delete(sessionID)
280280
log(`[${HOOK_NAME}] Cancelled countdown on user message`, { sessionID })
281281
}
282+
// Allow new continuation after user sends another message
283+
remindedSessions.delete(sessionID)
282284
}
283285

284286
if (sessionID && role === "assistant" && finish) {

0 commit comments

Comments
 (0)