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.
This commit is contained in:
Darin
2025-12-21 18:40:16 -08:00
committed by GitHub
parent d4c66e3926
commit 08957ce1f0

View File

@@ -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) {