How opencode-notify handles events
mainThe plugin listens for specific OpenCode session events and triggers notifications based on the following logic:
| Event | Notifies? | Sound | Description |
|---|---|---|---|
| Session complete | Yes | Glass | Main task is finished. |
| Session error | Yes | Basso | An error occurred that needs attention. |
| Permission needed | Yes | Submarine | The AI is blocked and waiting for user input. |
| Question asked | Yes | Submarine | The AI has a direct question for the user. |
| Sub-task complete/error | No | - | By default, these do not notify. Set notifyChildSessions: true to enable. |
Platform-Specific Behaviors
- macOS Focus Suppression: To prevent noise, the plugin suppresses
session.idle,session.error, andpermission.updatednotifications if your terminal is currently the active/focused window. - Question Priority: Question notifications bypass macOS focus suppression to ensure direct prompts are never missed.
- Click-to-Focus (macOS): Clicking a notification will foreground your terminal emulator.