Skip to content

Slack multi-account: channel messages not routed to secondary account's bound agent #16522

@hislegend

Description

@hislegend

Environment

  • OpenClaw version: 2026.2.9
  • OS: macOS (arm64)
  • Node: v25.5.0
  • Slack mode: Socket Mode

Setup

Two Slack apps (accounts) configured in one OpenClaw instance:

  • default (primary bot) — handles DMs + multiple channels
  • devbot (secondary bot) — bound to one private channel

Config (simplified):

{
  channels: {
    slack: {
      accounts: {
        default: { botToken: 'xoxb-...primary', appToken: 'xapp-...primary', ... },
        devbot: { botToken: 'xoxb-...secondary', appToken: 'xapp-...secondary', requireMention: false, ... }
      }
    }
  },
  bindings: [
    { agentId: 'devbot', match: { channel: 'slack', peer: { kind: 'group', id: 'C0ADQ3A2JUQ' } } }
  ]
}

Expected behavior

Messages in channel C0ADQ3A2JUQ should route to the devbot agent (per binding).

Actual behavior

  1. Both accounts start successfully ([default] starting provider, [devbot] starting provider, both socket mode connected)
  2. Channel messages in C0ADQ3A2JUQ route to agent:main instead of agent:devbot (confirmed via diagnostic lane logs: lane=session:agent:main:slack:channel:c0adq3a2juq)
  3. DMs to the devbot Slack app DO route to devbot correctly
  4. Human messages (not just bot messages) also fail to route to devbot in the channel

Additional findings

  • Initially tried with accountId: 'devbot' in the binding — same result
  • Without accounts.default explicitly defined (only accounts.devbot), the primary bot fails to start entirely — only devbot starts
  • After adding both as explicit accounts, both connect but channel routing still goes to main
  • No skip or no-mention log entries for devbot — it appears devbot never receives the channel message at all

Steps to reproduce

  1. Create two Slack apps with Socket Mode enabled
  2. Configure both as accounts under channels.slack.accounts
  3. Bind a channel to a non-default agent
  4. Send a message in that channel
  5. Observe routing goes to default agent, not bound agent

Workaround attempted

None found yet. The only working setup is single-account with agent binding (but then both agents respond as the same Slack bot identity).

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions