← All articles

SuperClaw Slack Bridge — Build and Operations

AI & Tools · September 2026 · living document, last updated September 15, 2026

This is a living document. It began as a private ops draft on 2026-09-09 and is updated in place whenever the bridge changes: dated annotations mark what newer sections superseded, and new activity appends at the bottom. Last updated: September 15, 2026.

Scope: Creation, updates, and debugging of the SuperClaw Slack bridge — initial setup, the /new command (+ recent title addition), and crash handling.


TL;DR

A Socket-Mode Slack bot that pipes Slack DMs/mentions into the opencode CLI (SuperClaw) one session per channel. Born 2026-08-31, survived two identical socket-layer crashes, got a watchdog on 2026-09-02, and landed /new <title> on 2026-09-03. Net-new code is small (~340 lines of ESM + an 89-line watchdog); the hard part was a third-party crash the watchdog now absorbs.


How it's wired (for the record)

Initial setup (2026-08-31)

First boot, first command ran within ~90 seconds — the whole bridge-to-reply path was live at 05:40, first real turn at 05:42, first full reply streamed at 05:45 (all times UTC):

2026-08-31T05:40:57Z Connected as @<BOT-USER>
2026-08-31T05:40:57Z SuperClaw is live in Slack...
2026-08-31T05:42:14Z MENTION event: "...draft an article..."
2026-08-31T05:42:14Z SPAWNED opencode pid N
2026-08-31T05:45:49Z opencode exit event: 0
2026-08-31T05:45:49Z REPLY to <SLACK-CHANNEL> (756 chars, streamed)

That's the whole first article (the Sun Project activity article, 2026-08-31) authored through the bridge — good stress test of streaming.

The /new command

Crashes & debugging (the meat)

Crash signature — an upstream state machine bug

Two crashes, identical root cause, raw stack, Node process died:

node_modules/finity/lib/core/StateMachine.js:76
  throw new Error('Unhandled event 'server explicit disconnect'
      in state 'connecting'.');
at SocketModeClient.onWebSocketMessage ...

Slack reconnects → socket-mode's finity state machine gets server explicit disconnect in state connecting → unhandled → process death.

Watchdog (2026-09-02, 23:05)

Decided the class of failure is "process dies silently," so absorb it procedurally:

Whole watchdog history to date — 3 restarts, all "bridge down," none wedged, no backoff:

2026-09-02T23:05:34Z watchdog up (pid …)
2026-09-02T23:05:36Z started bridge pid …
2026-09-02T23:06:06Z bridge down — restarting (fail #1)
2026-09-03T11:31:00Z bridge down — restarting (fail #1)   ← old code boot
2026-09-03T11:31:45Z bridge down — restarting (fail #1)   ← /new [title] deploy boot

Ha — one of those "fail #1" events is actually the code deploy on 09-03: old banner at 11:31:04, new banner at 11:31:49. And the very first takeover boot died ~30s in (silent, no stack — collateral of the pkill sweep).

Defense-in-depth that paid off

Key numbers (as of 2026-09-09)

Historical snapshot — the Update — 2026-09-15 section at the bottom carries everything since.

ThingValue
Bridge age9 days and counting (born 2026-08-31)
Crashes2 socket-mode (both pre-watchdog, same upstream bug) — 0 evidenced since; Sep 4–6 unverifiable (bridge.log truncated 09-07)
New failure modes since 09-03ReferenceError: result is not defined ×3 (Sep 7, non-fatal, user-visible) + 1 silent bridge death (~19:44–19:46Z Sep 7) absorbed by the watchdog
Host/container restarts3 evidenced (Sep 4 ~23:21Z, Sep 7 ~18:40–18:59Z, Sep 9 ~00:13–04:40Z) — pid resets + log gaps
Watchdog restarts5 "bridge down" restarts total (3 through 09-03 + 2 on 09-07); +5 supervisor ("watchdog up") boots since 09-03; still 0 wedged, 0 backoffs
Non-zero opencode exits3 total (08-31 ×1, recovered; 09-07 19:03Z ×2 — "Session not found" → fresh-session retry failed on LM Studio "No models loaded")
/new useslifetime 12 bare + 8 titled; since 09-03: 0 bare + 8 titled (7 of 8 titles verified verbatim in sessions.json)
Kill monitor strikes0 (still never fired)
Total log sizebridge.log ~60 KB (truncated 09-07 ~16:53Z — pre-09-07 story lost); + watchdog.log ~1.1 KB, restart-clean.log ~2.1 KB
Bridge statusalive — pid 412 (started 2026-09-09T04:43:17Z per watchdog.log); last bridge.log line 2026-09-09T14:29:05Z

What I'd keep / what I'd change (draft opinions)

2026-09-15 status: the watchdog opinions below were mooted on 09-10 — the watchdog itself was retired in favor of the catherder supervisor (see the update section). The keep-list still stands.

Keep:

Change / next:

Day-by-day log


Open follow-ups


Update — 2026-09-15 (everything since the Sep 9 freeze)

Supervision: watchdog → catherder

Sep 14 outage (self-inflicted, 17:16–17:50Z)

Session store: reconciliation + hygiene (Sep 14)

New bridge commands (Sep 15)

Restart/downtime notifications → SMS (Sep 15)

Evidence for this section: catherder/herder.log, slack-bridge/restart-status.log, slack-bridge/index.js (v: /status cats, /resume reconcile, /stop, /add), catherder.py (notify_sms), reboot-notify/reboot-notify-{setup,uninstall}.ps1, the store queries themselves.