Slack notifications
Slack notifications are off by default. Enabling them publishes selected archive content beyond the current machine and into the workspace’s retention, administration, export, and app-access boundary.
Posting surfaces
Section titled “Posting surfaces”Hansard provides three independent Slack surfaces:
- Summaries post one recap after a session has been quiet for the configured interval, 10 minutes by default.
- Firehose batches live user and assistant turns into one thread per
session, every 45 seconds by default. Tool calls are omitted unless
notify.slack.stream.includeToolsis explicitly enabled. - Digest posts a daily aggregate grouped by person or device, with session, repository, model, and token totals for its configured lookback window.
Imported web-chat history and SDK batch jobs are excluded from the live firehose. A resumed session opens a fresh thread containing only new turns.
Before setup
Section titled “Before setup”- Decide which repositories or owners may post.
- Create dedicated destination channels.
- Use a separate Slack app or token when routes require distinct identities.
- Confirm the workspace’s message retention and export policy.
- Review Redaction and test representative synthetic content.
The guided setup creates a personal Slack app whose manifest requests
chat:write and chat:write.customize. The second scope lets firehose turns
use per-speaker names; if it is unavailable, posts fall back to the ordinary bot
identity. Hansard does not request read access to Slack messages.
Guided setup
Section titled “Guided setup”-
Start the guided flow.
Terminal window hansard notify slack setupThe command opens Slack’s app-creation page with a manifest, verifies the bot token, asks for channel IDs, and sends a test post. It therefore performs an external write before it completes.
-
Invite the bot to each configured channel in Slack.
-
Review the saved state and preview the ordinary test message.
Terminal window hansard notify slack statushansard notify slack test --dry-run -
Send the test only after its channels and content are correct.
Terminal window hansard notify slack test
Restrict the default configuration
Section titled “Restrict the default configuration”The manual interface can enable summaries and firehose independently:
hansard notify slack enable \ --summaries on \ --summary-channel C0123456789 \ --quiet-minutes 10 \ --firehose off \ --repos github.com/example-org/example-repoIf --repos is empty, the legacy default route matches all eligible sessions.
Use explicit routes when different repositories, owners, providers, paths, or
configured folders should post to different channels.
Routes and named credentials
Section titled “Routes and named credentials”A session fans out to every matching route in order. An exclusive matching route stops evaluation and prevents later routes from also receiving it.
Store a named token interactively so it does not need to appear in a command line or human-edited config:
hansard notify slack token add example-botNamed tokens are kept in a mode-0600 local token file. CLI and viewer status
surfaces show only the name and a masked tail.
Add a restricted route that references the stored token:
hansard notify slack route add \ --match-owners example-org \ --summary-channel C0123456789 \ --token ref:example-bot \ --exclusiveInspect route order and effective channels without posting:
hansard notify slack route listRoutes can also match repositories, providers, local path prefixes, configured folders, and devices. Unlike Team selectors, Slack routing is local policy, so machine-local fields are allowed.
Digest preview
Section titled “Digest preview”After configuring the digest in Settings → Slack, preview the complete message without posting:
hansard notify slack digest run --dry-runAn empty digest window posts nothing.
Delivery and retention
Section titled “Delivery and retention”Going offline pauses posting but never archiving. Failed Slack writes keep their place and retry, so delivery is at least once rather than exactly once. To avoid flooding a channel, a backlog larger than 20 turns for one session posts only the most recent 20 plus a skipped-count note; the local archive still contains the full session.
Disable future posting with:
hansard notify slack disableDisabling Hansard does not remove messages already retained by Slack. Delete or expire those messages through Slack’s controls and revoke the app token when a connection is retired.