-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug] Multi-channel session routing - replies go to wrong channel #45514
Copy link
Copy link
Open
Description
Bug Description
When receiving messages from multiple channels (Telegram, Feishu, Weibo), replies are sent to the wrong channel instead of the channel where the message originated.
Steps to Reproduce
- Configure multiple channels (e.g., Telegram, Feishu, Weibo) with active sessions
- Send a message from one channel (e.g., Feishu)
- The reply is sent to a different channel (e.g., Telegram) instead of Feishu
Expected Behavior
Replies should be sent to the same channel where the message came from.
Actual Behavior
Replies are sent to the lastChannel (the most recently active session) rather than the message origin channel.
Root Cause Analysis
From the session store:
agent:main:telegram:direct:1086468464haslastChannel: telegramagent:main:feishu:direct:ou_xxxhaslastChannel: feishu
When a Feishu message arrives and is dispatched to the correct feishu session, the reply still goes to the channel with the most recent lastChannel (Telegram).
Logs
[feishu] feishu[default]: received message from ou_xxx in oc_xxx (p2p)
[feishu] feishu[default]: Feishu[default] DM from ou_xxx: "test message"
[feishu] feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_xxx)
[telegram] sendMessage ok chat=1086468464 message=5296 <- Reply sent to wrong channel!
Version
- OpenClaw: Latest (2026.3.x)
- OS: macOS
Workaround
None. User must disable other channels to receive replies correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.