Act on messages with rules
A rule watches your incoming texts and Gmail, or your sessions, and acts when its condition matches: archive, notify you, reply, forward, or start a session.
A rule acts for you when something happens: a text or email arrives that matches what you described, or a session reaches a status you care about. It can archive the message, notify you, reply, forward it, or start an agent to deal with it.
To have an agent's own words answered for you, use auto-replies instead. They live in the same panel.
Turn on rules#
Rules are off on a new install. Turn on Enable Channel Filters in Settings > Automations. The Automations row then appears in the sidebar under Automation.
Make a rule#
In the sidebar, open Automation, then Automations.
Click + New rule.
Give it a Name.
Under Where should it apply?, pick the channels (All, SMS or Gmail) and the direction.
Under How does it run?, pick when it runs, for example When a message arrives.
Under When should it trigger?, pick Always, Rules (match words in the sender, subject or body) or AI (describe what to look for).
Under What should happen?, click Add Action and pick one or more actions, in order.
Click Save Recipe.
A rule you make yourself runs as soon as you save it. A rule an agent creates for you waits, marked pending, until you approve it in your Inbox.
What a rule can do#
The actions include Block / Archive, Allow (Whitelist), Notify Me, Auto-Reply, Label, Summarize, Forward, Forward to email, Send Slack message, and three that work on your Claude sessions: CLI Session (start a new session), Send to CLI Session and Archive Session.
Before you save, the Test it card lets you type a sample message and see whether the rule would match and what it would do, without doing it.
Pause or delete a rule#
Each rule in the Automations panel (in the sidebar, Automation > Automations) shows when it last fired and how many times; a rule marked off does not run. To switch one rule off without deleting it, use its switch under Active Recipes in Settings > Automations. To delete it, click it in the panel, click Delete and confirm. To stop every rule at once, turn off Enable Channel Filters.
Saved credentials. Actions such as Send Slack message use a token you save once under Settings > Automations > Credentials. Credentials are stored encrypted on this computer, and a rule refers to them by name, so you can replace a token without editing your rules.
Session status rules. With When session status condition is met, a rule watches your sessions instead of messages, for example to act when a session has needed you for a while.
Stop at the first match. Stop processing further recipes on match keeps later rules from acting on a message this rule already handled.
Bug Intake was removed. The Bug Intake panel (Sentry and GitHub issue polling,
[BUG: name]emails) is gone. To start a session from a bug-report email, make a rule that matches words in the subject and starts a session.
Learn Yardmaster, Let it run itself: lesson 3 of 3
Act on messages with a rule