feat: Support reminders, so actions can be done automatically in delayed manner.
Reminders
A background scheduling system for opencode that allows agents to set up delayed or recurring reminders to re-execute actions.
Conversation Example: https://opencode.ai/s/WweTtomr
Overview
The Reminders system provides three core functions:
reminderadd()- Schedule a future reminderreminderlist()- View active remindersreminderremove()- Cancel scheduled reminders
Use cases
Delayed file monitoring
"Wait for 5 min and check this file again for instructions"
Creates a one-time timer that triggers after 5 minutes and executes the action "Review and decide what to do with /workspace/last-login.log".
Regular website monitoring
"Check this website regularly and let me know when it has new information"
Sets up a recurring timer (default 1 minute interval) that fetches http://google.com?q=Helsinki-News and compares content for changes.
Email auto-reply
"Check my email every hour and reply that I'm busy"
Creates a recurring 1-hour timer that checks email and sends automated responses using whatever email tools are available.
List active reminders
"Show me what I'm waiting for"
Returns all active reminders with their timers and descriptions.
Cancel reminders
"Stop checking my email"
Identifies and removes matching reminders based on description.
Integration points
Reminder tools
Three tools that agents can discover and use autonomously:
reminderadd
- Description: "Set up a reminder that will make me re-execute an action later. Use when user asks to 'remind me to...' or 'check X every Y time'. I'll actually perform the action when reminded, not just notify."
- Parameters:
interval_seconds,type(one-time/recurring),action_prompt,description - Critical:
action_promptmust contain fully resolved information (absolute paths, specific names, concrete data) since context may change over time - Success: Returns confirmation like "Reminder set: I'll check your email in 1 hour" or "Reminder set: I'll monitor the log file every 5 minutes"
- Error: When limit reached, returns "Can't set more reminders, too many reminders already active." along with list of current reminders, suggesting user choose which to remove first
reminderlist
- Description: "List all active reminders in this session. Use when user asks 'what reminders do I have' or wants to see scheduled actions."
- Returns: Array of active reminders with descriptions and next execution times
reminderremove
- Description: "Cancel a scheduled reminder. Use when user asks to 'stop checking X' or 'cancel the reminder for Y'. Will attempt to match user's description to existing reminders."
- Parameters:
description_pattern- What the user wants to stop - Success: Returns confirmation like "Reminder cancelled: No longer checking your email every hour" or "Reminder removed: Stopped monitoring log file"
- Error: Returns "No matching reminder found" if pattern doesn't match any active reminders
Storage integration
Reminders are persistently stored across application restarts and are restored when opencode starts up. Reminders are removed when:
- Session is deleted
- Reminder is explicitly cancelled
- Reminder expires (one-time reminders after execution)
Session integration
Reminders are session-scoped: they exist only while their session exists. When a session is deleted, all reminders belonging to that session are automatically removed.