Problem
The message tool (used by agents to send proactive messages) cannot route to plugin-registered channels. Specifically, telegram-userbot is registered via api.registerChannel() and appears in listPluginChannelIds(), but the message tool rejects sends with:
Unknown target "-1003812100686" for Telegram Userbot.
Expected Behavior
Plugin channels registered via api.registerChannel() should be discoverable by the message tool for proactive sends (not just in-session replies), including:
action=send with text
action=send with file attachments (filePath)
Current Behavior
- In-session reply delivery works perfectly (via
dispatchReplyWithBufferedBlockDispatcher → deliver callback)
- The
message tool's action=send with channel=telegram-userbot fails
- The error comes from
resolveOutboundTarget — the plugin's outbound.resolveTarget is never called
Context
The telegram-userbot plugin (openclaw-channel-telegram-userbot) uses GramJS to connect as a regular Telegram user account. It registers with api.registerChannel({ plugin }) and has full outbound.sendText and outbound.sendMedia adapters. These work for reply delivery but not for proactive message tool sends.
Steps to Reproduce
- Install and configure the telegram-userbot plugin
- From an agent session, use the message tool:
message(action='send', channel='telegram-userbot', target='-1003812100686', message='test')
- Result:
Unknown target error
Environment
- OpenClaw version: latest (March 2026)
- Plugin: openclaw-channel-telegram-userbot
- OS: macOS (Apple Silicon)
Problem
The
messagetool (used by agents to send proactive messages) cannot route to plugin-registered channels. Specifically,telegram-userbotis registered viaapi.registerChannel()and appears inlistPluginChannelIds(), but the message tool rejects sends with:Expected Behavior
Plugin channels registered via
api.registerChannel()should be discoverable by themessagetool for proactive sends (not just in-session replies), including:action=sendwith textaction=sendwith file attachments (filePath)Current Behavior
dispatchReplyWithBufferedBlockDispatcher→ deliver callback)messagetool'saction=sendwithchannel=telegram-userbotfailsresolveOutboundTarget— the plugin'soutbound.resolveTargetis never calledContext
The
telegram-userbotplugin (openclaw-channel-telegram-userbot) uses GramJS to connect as a regular Telegram user account. It registers withapi.registerChannel({ plugin })and has fulloutbound.sendTextandoutbound.sendMediaadapters. These work for reply delivery but not for proactive message tool sends.Steps to Reproduce
Unknown targeterrorEnvironment