Summary
When a session receives messages from both Telegram and webchat, the agent's automatic replies fail to deliver to Telegram — they only appear in webchat. Direct sends via the message tool work correctly.
Environment
- OpenClaw Version: 2026.1.29 (a5b4d22)
- OS: macOS 26.3 (arm64)
- Node: v23.11.0
- Gateway Mode: local (port 18789, loopback)
- Model: claude-opus-4-5
Channel Configuration
{
"channels": {
"telegram": {
"enabled": true,
"dmPolicy": "pairing",
"groupPolicy": "allowlist",
"streamMode": "partial"
}
},
"plugins": {
"entries": {
"telegram": {
"enabled": true
}
}
}
}
Steps to Reproduce
- Have both webchat and Telegram connected to the same session (
agent:main:main)
- Send a message from Telegram to the bot
- Observe: Message is received by the agent ✅
- Agent generates a reply
- Expected: Reply delivered to Telegram (originating channel)
- Actual: Reply only appears in webchat; Telegram receives nothing
Workaround
Using the message tool with explicit targeting works:
message({
action: "send",
channel: "telegram",
target: "<chat_id>",
message: "..."
})
// ✅ This delivers successfully
But automatic session replies (normal agent responses) do not route to Telegram.
Diagnostic Evidence
Session shows correct delivery context:
{
"key": "agent:main:main",
"channel": "telegram",
"deliveryContext": {
"channel": "telegram",
"to": "telegram:6231215677",
"accountId": "default"
},
"lastChannel": "telegram",
"lastTo": "telegram:6231215677"
}
Despite deliveryContext and lastChannel correctly showing Telegram, replies don't deliver there.
Gateway status shows Telegram OK:
┌──────────┬─────────┬────────┬─────────────────────────────┐
│ Channel │ Enabled │ State │ Detail │
├──────────┼─────────┼────────┼─────────────────────────────┤
│ Telegram │ ON │ OK │ token config · accounts 1/1 │
└──────────┴─────────┴────────┴─────────────────────────────┘
Related Issues
Root Cause Hypothesis
When a session has activity from multiple channels, the reply routing mechanism may be defaulting to webchat instead of respecting the originating channel from deliveryContext. The message tool bypasses this by explicitly specifying the target channel.
Impact
- Users messaging via Telegram don't receive responses unless the agent explicitly uses the
message tool
- Creates inconsistent UX where some replies appear on Telegram and others don't
- Requires agent to "remember" to use explicit sends, which is error-prone
Temporary Workaround
Agent must use message tool for all Telegram replies instead of relying on automatic routing.
Summary
When a session receives messages from both Telegram and webchat, the agent's automatic replies fail to deliver to Telegram — they only appear in webchat. Direct sends via the
messagetool work correctly.Environment
Channel Configuration
{ "channels": { "telegram": { "enabled": true, "dmPolicy": "pairing", "groupPolicy": "allowlist", "streamMode": "partial" } }, "plugins": { "entries": { "telegram": { "enabled": true } } } }Steps to Reproduce
agent:main:main)Workaround
Using the
messagetool with explicit targeting works:But automatic session replies (normal agent responses) do not route to Telegram.
Diagnostic Evidence
Session shows correct delivery context:
{ "key": "agent:main:main", "channel": "telegram", "deliveryContext": { "channel": "telegram", "to": "telegram:6231215677", "accountId": "default" }, "lastChannel": "telegram", "lastTo": "telegram:6231215677" }Despite
deliveryContextandlastChannelcorrectly showing Telegram, replies don't deliver there.Gateway status shows Telegram OK:
Related Issues
Root Cause Hypothesis
When a session has activity from multiple channels, the reply routing mechanism may be defaulting to webchat instead of respecting the originating channel from
deliveryContext. Themessagetool bypasses this by explicitly specifying the target channel.Impact
messagetoolTemporary Workaround
Agent must use
messagetool for all Telegram replies instead of relying on automatic routing.