Skip to content

Webchat connection hijacks Discord session reply channel in 2026.2.23 #25864

@Gamedesigner

Description

@Gamedesigner

Bug Description

When a webchat/Control UI connection is open while a Discord session is active, the webchat steals the reply channel from the Discord session. Agent replies intended for Discord are routed to webchat instead.

Steps to Reproduce

  1. Have a Discord channel bound to an agent (e.g., think agent bound to a Discord channel)
  2. Open the OpenClaw Control UI/webchat dashboard in a browser (connects via WebSocket to the same gateway)
  3. Send a message to the agent via Discord (@mention)
  4. Agent processes the message (logs show messageChannel=discord on inbound)
  5. Agent's reply goes to webchat UI instead of Discord

Evidence from Logs

22:28:50 — embedded run start: messageChannel=discord ✅ (inbound from Discord)
22:28:45 — webchat disconnected
22:29:03 — webchat connected (dashboard auto-reconnected)
22:29:07 — embedded run start: messageChannel=webchat ❌ (reply channel switched!)

Even after closing the webchat tab, the issue persists — suggesting the session remembers the last webchat connection as its reply channel.

Also observed: 2 pending delivery entries that fail recovery on every restart (Recovery time budget exceeded).

Expected Behavior

Discord messages should always reply to Discord, regardless of whether a webchat connection is active. Webchat should be read-only/observer for Discord-bound sessions, or at least not override the reply channel.

Workaround

Using message(action=send, channel=discord, target=channelId) tool explicitly sends to Discord correctly. Only the native reply pipeline is affected.

Environment

  • OpenClaw: 2026.2.23 (b817600)
  • OS: Linux (WSL2) on Windows
  • Agent: embedded (anthropic/claude-opus-4-6)
  • Channel: Discord
  • Gateway: loopback + Tailscale serve
  • Config: gateway.controlUi.enabled: true, gateway.controlUi.dangerouslyDisableDeviceAuth: true

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