-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Gateway should self-SIGTERM after K=3 failed Slack reconnects (silent 15h outage in v2026.5.7) #81491
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Summary
channels.slackprovider can die inside a live gateway with no recovery: in-process health-monitor logsrestarting (reason: disconnected)but the restart silently fails and never escalates to process-level restart. HTTP/healthcontinues returning 200, so external watchdogs that probe HTTP see nothing wrong.Caused a 15h 30m silent Slack outage for me on 2026-05-12.
Version
[email protected](homebrew npm install on macOS Darwin 25.3.0)Repro
slack socket mode connected.slack socket mode connectedline. Ever./healthreturns 200 throughout — process is alive, provider is dead.My actual outage (timestamps from
/tmp/openclaw/openclaw-2026-05-12.log)The fact that a manual stop+start recovered in 1 second confirms the gateway-internal slack provider got stuck and only a fresh process recovers it.
Proposed fix
After K=3 (configurable, e.g.
channels.slack.reconnect.processRestartAfter) in-process reconnect attempts fail within a window, the gateway should callprocess.kill(process.pid, 'SIGTERM')so launchd / systemd / watchdog respawns the whole process.This is the only reliable recovery path observed; in-process provider restart appears unreliable under socket-state corruption.
Why this matters
External HTTP watchdogs cannot detect this — process is healthy by every observable signal except channel-provider state. Operators must either:
My workaround
I added an external
slack_socket_healthy()function to my watchdog that grep-parses the gateway log for lastslack socket mode connectedvssocket disconnectedtimestamps. Force-restart if disconnected > 300s. Code: https://github.com/Lakescape/DockBotclaw/pull/13This shouldn't be necessary — fixing it upstream removes the need for external log parsing.
Acceptance
channels.slack.reconnect.processRestartAfter(default3) controls escalation thresholdHappy to test against a pre-release if useful. Logs from outage available on request.