Skip to Content
MissionsNotifications
View as .md

Notifications

A notification block makes a mission announce its terminal outcomemission_completed or mission_failed — to one or both of two channels: the configured gateway (Discord, Slack, …) and the command center.

Notifications are opt-in per mission: a mission with no notification block emits nothing.

mission "nightly_ingest" { notification { gateway { events = ["mission_failed"] # only ping the gateway on failure channel = "#ops-alerts" # gateway-only destination override } command_center { events = ["all"] # show every terminal event in the UI } } commander { model = models.anthropic.claude_sonnet_4 } agents = [agents.worker] task "ingest" { objective = "Pull and normalize today's data" } }

Channels

A notification block contains up to two channel sub-blocks. At least one is required.

ChannelDelivery
gatewayPosts a message to the configured gateway’s external system (Discord/Slack/…). Requires a top-level gateway block.
command_centerPushes the notification to the command center UI (a bell feed). No-ops when no command center is connected.

A channel fires only when its block is present. To turn a channel off without deleting its config, set enabled = false.

Channel fields

FieldTypeRequiredDefaultDescription
enabledboolnotrueSet false to keep the channel configured but stop delivery.
eventslist(string)yesWhich terminal events fire. Values: mission_completed, mission_failed, or "all" (every terminal event).
channelstringnogateway defaultgateway-only. Per-mission destination override — a channel name (with or without a leading #, e.g. "#ops-alerts") or a raw channel id. The gateway resolves names against its workspace/guild, so you don’t need to look up an id. When omitted, the gateway posts to its globally configured default channel. Rejected on command_center.

events is always explicit — there is no implicit “all”. Use events = ["all"] to opt into every terminal event.

What each event carries

  • mission_completed — fires when the mission finishes successfully.
  • mission_failed — includes the failure error message.

A user-initiated stop is not a notification event.

Examples

Failures everywhere, completions only in the UI

notification { gateway { events = ["mission_failed"] } command_center { events = ["all"] } }

Route a mission’s alerts to a dedicated channel

notification { gateway { events = ["all"] channel = "#ops-alerts" # name or id; this mission posts here, not the gateway default } }

Temporarily mute a channel

notification { command_center { enabled = false # keep the config, stop delivery events = ["all"] } }

Validation

  • A notification block must declare at least one of gateway / command_center.
  • Each channel’s events list is required and must contain only valid values (mission_completed, mission_failed, "all").
  • A gateway channel requires a top-level gateway block — squadron verify errors otherwise.
  • channel is rejected on the command_center channel.

Notes

  • Notifications fire only in serve mode (squadron engage), where the mission runs under the command-center bridge.
Last updated on