Skip to content

[Bug]: Bug + Fix: Multi-Agent Telegram Routing Fails Without Explicit accountId in message Tool #26975

@kunjut-gav

Description

@kunjut-gav

Summary

When using multiple agents with individual Telegram bots, the message tool sends responses through the wrong bot (coordinator bot instead of the agent's own bot) unless accountId is explicitly specified.

Steps to reproduce

  1. Configure 7 agents with unique Telegram bots (MAIN + 6 specialized agents)

  2. Set up coordinator pattern: User → Telegram MAIN → MAIN (webchat) → Agent

  3. Agent receives task from MAIN in webchat

  4. Agent responds using message tool without accountId:

    message({
    action: "send",
    channel: "telegram",
    target: "377584990",
    message: "Response"
    })

  5. Message arrives from wrong bot (MAIN instead of agent's bot) or gets stuck in webchat

Expected behavior

Agent posts reply via its own Telegram bot to user's private chat. User receives message from @agentbot, not @MAIN_bot.

Actual behavior

Message routes through MAIN's bot or stays in webchat only. Agent's bot never sends message to user. User sees no response or response from wrong bot.

OpenClaw version

v2026.2.22-2

Operating system

Windows 11 / Docker

Install method

Docker

Logs, screenshots, and evidence

NONO NO NO NO NAH

Impact and severity

  • Affected: Multi-agent setups with individual Telegram bots
  • Severity: High (blocks proper multi-agent coordination)
  • Frequency: 100% reproducible without accountId
  • Consequence: Agents cannot communicate directly with users; all messages route through coordinator bot or get lost

Additional information

SOLUTION FOUND: Use explicit accountId matching agent identifier:

message({
action: "send",
channel: "telegram",
accountId: "codeagent", // CRITICAL: must match agent name
target: "377597847", - U id
message: "Response from CodeAgent"
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions