When to ask
Ask before actions that are:- Irreversible: deleting data, force-pushing, dropping tables, rotating credentials.
- Outward-facing: deploys, publishing, emails or messages to customers, PRs on other people’s repos.
- Costly: spending money or quota, refunds, large API bills.
- Ambiguous: two reasonable paths, where the wrong pick wastes real work.
The question
- One decision per approval. “Deploy v2.4 to production?” beats “Review the release”.
- Make it answerable from the notification alone: name the thing and the action.
- Up to 500 characters, but aim for one line.
- Put the short form in
notification_summary(up to 120 characters). It becomes the push title: “Agent name: summary”.
The context
context_markdown (up to 2500 characters) is what the reviewer reads before answering. Cover:
- What will happen, concretely: the command, the recipients, the amount.
- Why the agent wants to do it.
- What changes: a diff summary, the affected records, the blast radius.
- How to undo it, or that it can’t be undone.
The options
- One to four options, each with a
label(up to 120 characters) and avalue(up to 500). - Put the go-ahead option first. The CLI treats the first option as approval by default.
- Make values machine-friendly and stable (
deploy,staging_only,cancel), and branch onselected_option_value, never on the label. - Offer a middle path when there is one: “Deploy”, “Staging only”, “Cancel”.
- Reviewers can always write their own answer instead. Handle
custom_instruction: follow it, or stop and tell a person.
Timeouts and fallbacks
- Give people realistic time. A deploy gate might be 15 minutes; a weekly report, 4 hours.
- Decide what happens when nobody answers. Expire with a fallback instruction returns your text as
custom_instructionon expiry, for example “Nobody answered. Don’t send; leave it in drafts.” - Never treat
expiredas approval.