Skip to content

Expose clientPingTimeout for Slack Socket Mode configuration #14248

Description

@shivasymbl

Problem

The Slack Socket Mode integration uses @slack/socket-mode under the hood, which defaults clientPingTimeout to 5000ms. In production, Slack's WebSocket servers frequently take longer than 5 seconds to respond to pings, causing a flood of pong timeout warnings (~70/hour) that eventually cascade into full connection failures requiring a restart.

This is a known Slack server-side issue (slackapi/bolt-js#2496) that the SDK maintainers acknowledge as expected behavior due to Slack's WebSocket infrastructure recycling containers.

Current Behavior

OpenClaw's Slack channel initialization passes no ping/pong configuration to the Bolt App() constructor:

const app = new App(slackMode === "socket" ? {
    token: botToken,
    appToken,
    socketMode: true,
    clientOptions
} : { ... });

The underlying SocketModeClient supports clientPingTimeout and serverPingTimeout as constructor options, but there's no way for users to configure these values through openclaw.json.

Proposed Solution

Add optional Socket Mode tuning parameters to the Slack channel config in openclaw.json:

{
  "channels": {
    "slack": [{
      "botToken": "xoxb-...",
      "appToken": "xapp-...",
      "socketMode": {
        "clientPingTimeout": 15000,
        "serverPingTimeout": 30000,
        "pingPongLoggingEnabled": false
      }
    }]
  }
}

And pass them through to the App() or SocketModeClient constructor.

Workaround

Currently the only option is to manually patch the installed SDK file (node_modules/@slack/socket-mode/dist/src/SocketModeClient.js), which gets overwritten on every update.

Environment

  • OpenClaw v2026.2.9
  • @slack/socket-mode v2.0.5
  • @slack/bolt v4.6.0
  • Running on Ubuntu 24.04 (DigitalOcean)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions