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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user