OpenClaw Agent Relay Plugin Fixes Telegram Delivery in Multi-Agent Setups

A developer has released openclaw-agent-relay, a plugin that solves the problem where sessions_send in multi-agent setups fails to deliver responses to Telegram users.
The Problem with sessions_send
When using sessions_send to pass messages between agents, the target agent's response goes to channel=webchat (an internal channel) instead of reaching the user on Telegram. This happens because sessions_send preserves session and conversation history but doesn't properly handle delivery. The issue is documented in closed ticket #13374 marked as NOT_PLANNED. Additionally, it can corrupt the session's delivery context, flipping it from telegram to webchat permanently (referenced in #44153 and #31671).
Existing Workarounds and Their Limitations
Developers have tried two main approaches:
- Explicit message tool usage: The target agent calls message with channel: "telegram" and explicit to/threadId, then returns ANNOUNCE_SKIP. This is documented in #47971 and #28603. Problems include needing to embed delivery instructions in every sessions_send payload and agents forgetting to use the workaround, especially in longer sessions.
- Relying on announce step: Using timeout=0 to get an announce step where the agent can write a user-facing response. However, models tend to return ANNOUNCE_SKIP instead of writing content (#43295). Announce delivery also has issues: drops threadId for Telegram topics (#47971, #45878), silently fails with multi-channel setups (#47524), and ANNOUNCE_SKIP text can leak to users (#45084).
The Solution: openclaw-agent-relay
The plugin bypasses both sessions_send and announce entirely. It uses the same gateway WebSocket RPC that subagents use internally (callGateway({ method: "agent" })) to trigger an agent turn in the existing session with deliver: true. The agent responds normally without special instructions, ANNOUNCE_SKIP, or message tool workarounds, and the response goes directly to Telegram.
How to Use It
Two methods are available:
- Tool wake_agent: Any agent can call it to wake another agent in their session:
wake_agent({ sessionKey: "agent:my-agent:telegram:direct:123456", message: "Hey, remind the client about the contract" }) - HTTP POST /notify: For cron jobs, scripts, or external triggers:
curl -X POST http://127.0.0.1:18790/notify \ -H "Authorization: Bearer your-secret-token" \ -H "Content-Type: application/json" \ -d '{"sessionKey":"agent:my-agent:telegram:direct:123456", "message":"Reminder: client asked for the contract"}'
Installation
Install with: openclaw plugins install openclaw-agent-relay
The developer notes that implementing the gateway RPC authentication involved working with Ed25519 device identity, challenge-response protocols, and undocumented protocol quirks.
📖 Read the full source: r/openclaw
👀 See Also
PullMD v2.4.1 Adds Native MCP Connector for claude.ai Web and Multi-User Auth
PullMD v2.4.1 now supports the claude.ai web custom connector dialog via OAuth 2.1 + PKCE-S256 and adds multi-user auth modes. Turn any URL into clean Markdown via self-hosted MCP.

OpenClaw Context Meter Plugin Shows Telegram Token Usage Percentage
A new OpenClaw plugin displays token usage percentage after every Telegram bot response, showing values like '45k / 200k (22%)' and detecting compaction events. The plugin avoids OOM issues by hardcoding context windows instead of using execSync.

Context Gateway: An Open-Source Proxy for Compressing AI Agent Context
Context Gateway is an open-source proxy that sits between coding agents and LLMs, compressing tool outputs before they enter the context window. It uses small language models to detect signal in context, performs background compaction at 85% window capacity, and includes spending caps, a dashboard, and Slack notifications.

OnPrem.LLM AgentExecutor: Launch Sandboxed AI Agents with Built-in Tools
OnPrem.LLM's AgentExecutor lets you create autonomous AI agents that execute complex tasks using cloud or local models, with nine built-in tools including file operations, shell commands, and web search. You can run agents in sandboxed containers for security.