Skip to content

Plugin channels not discoverable by message tool for proactive sends #48465

Description

@MaxVidkrytaklishnya

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

  1. Install and configure the telegram-userbot plugin
  2. From an agent session, use the message tool:
    message(action='send', channel='telegram-userbot', target='-1003812100686', message='test')
    
  3. Result: Unknown target error

Environment

  • OpenClaw version: latest (March 2026)
  • Plugin: openclaw-channel-telegram-userbot
  • OS: macOS (Apple Silicon)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions