-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Description
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
- Have a Discord channel bound to an agent (e.g.,
thinkagent bound to a Discord channel) - Open the OpenClaw Control UI/webchat dashboard in a browser (connects via WebSocket to the same gateway)
- Send a message to the agent via Discord (@mention)
- Agent processes the message (logs show
messageChannel=discordon inbound) - 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