Skip to content

Slack socket mode: events not received when using accounts object #17507

@ZetiMente

Description

@ZetiMente

Bug Description

Unable to have two accounts for Slack @mention. Slack socket mode connections succeed when using the accounts object in channels.slack, but no events are ever received. Direct messages work fine but unable to do @mentions. The same bot token works correctly when placed at the top level of channels.slack where @mentions work fine.

Environment

  • OpenClaw version: 2026.2.14
  • Platform: Raspberry Pi (aarch64), Debian, Node 22.22.0
  • Slack mode: Socket mode

Reproduction

Working config (top-level tokens)

{
  "channels": {
    "slack": {
      "enabled": true,
      "groupPolicy": "open",
      "dmPolicy": "open",
      "botToken": "xoxb-...",
      "appToken": "xapp-...",
      "name": "bot1"
    }
  },
  "bindings": [
    { "agentId": "bot1", "match": { "channel": "slack" } }
  ]
}

Logs show [default] starting providerslack socket mode connected → events flow normally, @mentions in channels work.

Broken config (accounts object, same token)

{
  "channels": {
    "slack": {
      "enabled": true,
      "groupPolicy": "open",
      "dmPolicy": "open",
      "accounts": {
        "default": {
          "name": "bot1",
          "botToken": "xoxb-...",
          "appToken": "xapp-..."
        }
      }
    }
  },
  "bindings": [
    { "agentId": "bot1", "match": { "channel": "slack", "accountId": "default" } }
  ]
}

Logs show [default] starting providerslack socket mode connectedzero events received. No log entries at all when @mentioning the bot in a channel. DMs also stop working.

What was tested

Config Providers start? Socket connects? Events received?
Top-level tokens (no accounts) Yes ([default]) Yes Yes
Single bot in accounts.default Yes ([default]) Yes No
Two bots in accounts (named bot1 + bot2) Yes (both) Yes (both) No
Two bots in accounts (named default + bot2) Yes (both) Yes (both) No
Top-level tokens + accounts.bot2 (hybrid) Bot2 only Yes No (bot1's provider didn't start)

Key finding

The accounts object itself is the problem. Even with a single account named default using the exact same token that works at the top level, events stop flowing. The socket handshake completes but the event listener/handler does not appear to receive any Slack events.

Expected behavior

Events should be received and processed identically whether tokens are at the top level or inside the accounts object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions