Skip to content

Discord multi-account: session delivery ignores accountId in deliveryContext #15418

@mrdeeds89

Description

@mrdeeds89

Bug Description

When using multiple Discord bot accounts, session delivery does not respect the accountId in the bound deliveryContext. All responses are posted through the default account instead of the agent's configured account.

Steps to Reproduce

  1. Configure multiple Discord accounts in channels.discord.accounts (e.g., kirk, dex, etc.)
  2. Set up bindings to route different agents to different accounts:
    {"agentId": "kirk", "match": {"channel": "discord", "accountId": "kirk"}}
  3. Have agent respond in a Discord channel via [[reply_to_current]] or normal text response
  4. Observe that the message is posted by the default account (e.g., Frank#4147) instead of the bound account (e.g., Kirk#2166)

Expected Behavior

Session responses should be delivered through the accountId specified in the session's deliveryContext.

Actual Behavior

All session responses go through the default Discord account, regardless of deliveryContext.accountId.

Workaround

Agents must explicitly use the message tool with accountId parameter:

message(action="send", channel="discord", accountId="kirk", to="CHANNEL_ID", message="...")

Environment

  • OpenClaw version: 2026.2.12
  • Multiple Discord accounts: 10 configured
  • Bindings: Correctly set up per account

Evidence

  • Explicit message(accountId="kirk") posts as Kirk#2166 ✅
  • Session reply via [[reply_to_current]] posts as Frank#4147 ❌
  • Session deliveryContext shows accountId: "kirk" but delivery uses default

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions