Schedule actions to run at intervals in OpenCode sessions. Set one-time or recurring reminders that execute prompts automatically.
- ⏰ One-time reminders - Execute an action after a delay
- 🔄 Recurring reminders - Execute an action at regular intervals
- 💾 Persistent - Survives OpenCode restarts
- 🧹 Auto-cleanup - Removes reminders when sessions are deleted
- 🔒 Session-scoped - Reminders tied to specific sessions
bun install opencode-remindersThen add to your opencode.json:
{
"plugin": [
"opencode-reminders"
]
}OpenCode will automatically load the plugin when you start the TUI.
One-time (execute once after delay):
"In 5 minutes, check the build status"
Recurring (execute repeatedly):
"Every hour, check for new emails and summarize them"
"What reminders do I have?"
"Show my active reminders"
"Stop checking my email"
"Cancel the build status reminder"
- Storage - Reminders saved as JSON files in
.opencode/reminders/<project-id>/ - Scheduling - Uses
setTimeoutto schedule executions - Execution - Sends prompt to session when timer fires
- Cleanup - Removes reminders when session deleted
Reminders stored in:
.opencode/
reminders/
<project-id>/
<reminder-id>.json
.gitignore
The .gitignore file is automatically created to exclude reminder data from version control.
The plugin supports the following configuration options (set via plugin config):
{
reminders: {
enabled: true, // Enable/disable plugin
max_reminders_per_project: 50, // Maximum reminders per project
min_interval_seconds: 30, // Minimum interval between executions
notifications: {
enabled: true // Enable/disable toast notifications
}
}
}bun installtsc --noEmit# Run all tests
bun test
# Run specific test suites
bun test test/types.test.ts
bun test test/storage.test.ts
bun test test/logger.test.ts
bun test test/config.test.ts
bun test test/scheduler.test.ts
bun test test/integration.test.ts
# Watch mode
bun test --watch
# Using npm scripts
npm run test
npm run test:types
npm run test:storage
npm run test:logger
npm run test:integration
npm run test:watchTest Coverage: Comprehensive test suite covering types, storage, logging, configuration, scheduling, and integration.
This plugin demonstrates a multi-file structure:
index.ts- Main plugin export with tool definitions and event handlerstypes.ts- TypeScript types and Zod schemasstorage.ts- Filesystem operations for persistencescheduler.ts- Timer management and execution logiclogger.ts- Logging functionality with configurable levelstools/- Tool implementations (reminderadd, reminderlist, reminderremove)test/- Comprehensive test suitepackage.json- Dependencies configurationtsconfig.json- TypeScript configuration
Reminders not executing?
- Check session still exists
- Verify reminder shows in list
- Check console for errors
Reminders lost after restart?
- Ensure storage directory not deleted
- Check file permissions
Too many reminders?
- Default limit: 50 per session
- Remove old reminders before adding new ones
MIT