Description
When multiple surfaces (Telegram, WebChat, Control UI) share the same agent:main:main session, replies to messages sent from WebChat or Control UI are also delivered to Telegram, instead of only going back to the originating surface.
Expected Behavior
Per the docs: "OpenClaw routes replies back to the channel where a message came from." Replies to WebChat messages should only go to WebChat; replies to Control UI messages should only go to Control UI.
Actual Behavior
Replies are also sent to Telegram, even when the message was sent from WebChat or Control UI. This results in duplicate messages appearing in Telegram.
Suspected Cause
Based on reading the channel-routing docs, the Main DM route pinning mechanism may be involved:
When session.dmScope is main, direct messages may share one main session. To prevent the session's lastRoute from being overwritten by non-owner DMs, OpenClaw infers a pinned owner from allowFrom when all of these are true:
allowFrom has exactly one non-wildcard entry
In my config, channels.telegram.allowFrom has exactly one entry (92813170), so Telegram is pinned as the owner. When WebChat/Control UI sends a message, the lastRoute may not update (since the webchat sender doesn't match the pinned Telegram owner), causing the reply to still route to Telegram.
Config (relevant parts)
{
"channels": {
"telegram": {
"enabled": true,
"dmPolicy": "allowlist",
"allowFrom": ["92813170"]
}
},
"gateway": {
"bind": "lan",
"controlUi": {
"dangerouslyDisableDeviceAuth": true
}
}
}
No explicit session.dmScope or webchat config — using defaults.
Reproduction Steps
- Have Telegram + WebChat (PinchChat) + Control UI all connected to the same gateway
- Telegram
allowFrom has exactly one entry
- Send a message from WebChat
- Observe: reply appears in both WebChat and Telegram
- Send from Telegram → reply only appears in Telegram (correct)
Environment
- OpenClaw 2026.3.2 (85377a2)
- macOS (Apple Silicon)
- Model: claude-opus-4-6 (not relevant to routing)
Questions
- Is this expected behavior for multi-surface main sessions?
- If so, is there a config option to disable Telegram fan-out when the message originates from another surface?
- Should WebChat/Control UI messages update
lastRoute even when a pinned owner exists?
Description
When multiple surfaces (Telegram, WebChat, Control UI) share the same
agent:main:mainsession, replies to messages sent from WebChat or Control UI are also delivered to Telegram, instead of only going back to the originating surface.Expected Behavior
Per the docs: "OpenClaw routes replies back to the channel where a message came from." Replies to WebChat messages should only go to WebChat; replies to Control UI messages should only go to Control UI.
Actual Behavior
Replies are also sent to Telegram, even when the message was sent from WebChat or Control UI. This results in duplicate messages appearing in Telegram.
Suspected Cause
Based on reading the channel-routing docs, the Main DM route pinning mechanism may be involved:
In my config,
channels.telegram.allowFromhas exactly one entry (92813170), so Telegram is pinned as the owner. When WebChat/Control UI sends a message, thelastRoutemay not update (since the webchat sender doesn't match the pinned Telegram owner), causing the reply to still route to Telegram.Config (relevant parts)
{ "channels": { "telegram": { "enabled": true, "dmPolicy": "allowlist", "allowFrom": ["92813170"] } }, "gateway": { "bind": "lan", "controlUi": { "dangerouslyDisableDeviceAuth": true } } }No explicit
session.dmScopeor webchat config — using defaults.Reproduction Steps
allowFromhas exactly one entryEnvironment
Questions
lastRouteeven when a pinned owner exists?