Back to Hooks

Todo Continuation Enforcer

Ensures that the agent completes all items in its Todo list. If the agent stops working while tasks remain marked as "pending" or "inprogress", this h...

Todo Continuation Enforcer

Description

Ensures that the agent completes all items in its Todo list. If the agent stops working while tasks remain marked as "pending" or "in_progress", this hook injects a system reminder to continue.

Features

  • Idle Detection: Monitors for session.idle events.
  • Todo Verification: Fetches the current Todo list state.
  • Auto-Continuation: Injects a prompt ("Continue working on the next pending task...") if incomplete items exist.
  • Countdown: Displays a "Resuming in X seconds..." toast to the user, allowing them to intervene if needed.
  • Permission Checks: Skips agents that don't have write permissions or are explicitly excluded (e.g., Planner).

Trigger Events

  • session.idle: Main trigger for checking completion.
  • session.error / message.updated: Cancels any pending countdowns to prevent interference with user actions.

Configuration

  • Countdown Seconds: Default 2s.
  • Skip Agents: Default ["Prometheus (Planner)"].