add_wake_rule
Create a rule to automatically activate the agent when a matching message is received. Specify target type, optional keywords, and source to trigger wake-up.
Instructions
Add a wake rule: when a matching message arrives, opencode wakes up.
When a message matches this rule, the agent is activated and the message context is made available. Use add_wake_rule to create rules, list_wake_rules to see them, remove_wake_rule to delete, and set_wake_enabled to toggle.
Rules are persisted to disk and survive restarts. Keywords are optional: empty list matches any message. target_id=None matches any source.
Mutates the wake rule configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_type | Yes | ||
| target_id | No | ||
| keywords | No | ||
| ignore_if_focused | No |