openclaw - 💡(How to fix) Fix [Bug]: ClawTalk WebSocket disconnect starves Slack Socket Mode event loop, causing stale-socket restart [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63488Fetched 2026-04-09 07:53:12
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

When the ClawTalk WebSocket connection (wss://clawdtalk.com/ws) experiences a pong timeout and disconnects, Slack Socket Mode message processing stops. Slack messages are not acknowledged within the 3-second window, the health monitor detects a stale socket, and restarts the Slack provider. Buffered messages may be lost.

ClawTalk and Slack are independent channels connecting to different servers, but they share the same gateway Node.js process and event loop. A transient failure in one channel should not affect the other.

Error Message

16:37:47 [compaction-safeguard] new content uses 206.4% of context; dropped 3 older chunk(s)
16:43:28 [gateway] Pong timeout, closing connection
16:43:28 [gateway] ClawTalk disconnected: code=1006 reason=unknown
16:43:28 [gateway] ClawTalk reconnecting in 5s (attempt 1)
16:43:36 [gateway] ClawTalk connected, authenticating...
16:43:36 [gateway] ClawTalk authenticated (v0.2.0)
-- No Slack activity logged between 16:37 and manual restart at 17:13 --

After manual gateway restart, Slack reconnects and works normally.

Root Cause

When the ClawTalk WebSocket connection (wss://clawdtalk.com/ws) experiences a pong timeout and disconnects, Slack Socket Mode message processing stops. Slack messages are not acknowledged within the 3-second window, the health monitor detects a stale socket, and restarts the Slack provider. Buffered messages may be lost.

ClawTalk and Slack are independent channels connecting to different servers, but they share the same gateway Node.js process and event loop. A transient failure in one channel should not affect the other.

Code Example

16:37:47 [compaction-safeguard] new content uses 206.4% of context; dropped 3 older chunk(s)
16:43:28 [gateway] Pong timeout, closing connection
16:43:28 [gateway] ClawTalk disconnected: code=1006 reason=unknown
16:43:28 [gateway] ClawTalk reconnecting in 5s (attempt 1)
16:43:36 [gateway] ClawTalk connected, authenticating...
16:43:36 [gateway] ClawTalk authenticated (v0.2.0)
-- No Slack activity logged between 16:37 and manual restart at 17:13 --
RAW_BUFFERClick to expand / collapse

Description

When the ClawTalk WebSocket connection (wss://clawdtalk.com/ws) experiences a pong timeout and disconnects, Slack Socket Mode message processing stops. Slack messages are not acknowledged within the 3-second window, the health monitor detects a stale socket, and restarts the Slack provider. Buffered messages may be lost.

ClawTalk and Slack are independent channels connecting to different servers, but they share the same gateway Node.js process and event loop. A transient failure in one channel should not affect the other.

Steps to Reproduce

  1. Have both ClawTalk and Slack extensions enabled in openclaw.json
  2. Gateway is running normally, processing Slack messages
  3. ClawTalk WebSocket misses a pong (network hiccup, server maintenance, or heavy compaction event)
  4. ClawTalk disconnects and begins reconnection

Expected Behavior

  • ClawTalk reconnects independently
  • Slack message processing continues uninterrupted
  • Channels are isolated from each other's connection failures

Actual Behavior

  • ClawTalk reconnection logic consumes event loop cycles
  • Slack Socket Mode client cannot ack events within the 3-second timeout
  • Health monitor detects stale Slack socket and force-restarts the Slack provider
  • Slack messages received during the gap are lost or delayed

Logs

16:37:47 [compaction-safeguard] new content uses 206.4% of context; dropped 3 older chunk(s)
16:43:28 [gateway] Pong timeout, closing connection
16:43:28 [gateway] ClawTalk disconnected: code=1006 reason=unknown
16:43:28 [gateway] ClawTalk reconnecting in 5s (attempt 1)
16:43:36 [gateway] ClawTalk connected, authenticating...
16:43:36 [gateway] ClawTalk authenticated (v0.2.0)
-- No Slack activity logged between 16:37 and manual restart at 17:13 --

After manual gateway restart, Slack reconnects and works normally.

Environment

  • OpenClaw Gateway v2026.4.5
  • Node.js v25.5.0
  • Slack extension: Socket Mode
  • ClawTalk extension: enabled, autoConnect: true
  • Both extensions share agentId: "main"

Suggested Fix

One or more of:

  • Run channel extensions in separate worker threads or child processes so one channel's WebSocket failure cannot starve another's event loop
  • Ensure ClawTalk reconnection logic is fully non-blocking (no synchronous operations during reconnect)
  • Decouple Slack ack processing from the main event loop (dedicated microtask queue)
  • Add a configurable option to isolate channels into separate runtimes

Related Issues

  • #56399 — Discord WebSocket crash kills gateway process (same class: one channel failure affects entire gateway)
  • #39572 — stale-socket reconnect loop (related Slack reconnection behavior)
  • #36687 — cross-channel reply leakage (channel isolation concern)

extent analysis

TL;DR

Run channel extensions in separate worker threads or child processes to prevent one channel's WebSocket failure from affecting another's event loop.

Guidance

  • Investigate using Node.js worker threads or child processes to isolate channel extensions, ensuring that a failure in one channel does not block the event loop of another.
  • Review the ClawTalk reconnection logic to ensure it is fully non-blocking and does not perform any synchronous operations during reconnect.
  • Consider decoupling Slack ack processing from the main event loop using a dedicated microtask queue to prevent timeouts.
  • Evaluate the need for a configurable option to isolate channels into separate runtimes for better fault tolerance.

Example

No specific code example is provided as the issue suggests a high-level architectural change rather than a specific code fix.

Notes

The suggested fix involves significant architectural changes, which may require thorough testing to ensure that the isolation of channels does not introduce new issues, such as increased latency or complexity in managing the separate worker threads or child processes.

Recommendation

Apply a workaround by running channel extensions in separate worker threads or child processes, as this approach directly addresses the issue of one channel's failure affecting the entire gateway, providing a clear path to isolating the impact of WebSocket connection failures.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: ClawTalk WebSocket disconnect starves Slack Socket Mode event loop, causing stale-socket restart [1 participants]