Bug Description
sessions_send from one agent to another changes the target session's channel field in sessions.json from "telegram" to "webchat". This breaks Telegram message routing — the target agent stops receiving Telegram messages from the user.
Steps to Reproduce
- Agent A (main) has a running session on Telegram
- Agent B (builder) has a running session on Telegram (
channel: "telegram" in sessions.json)
- Agent A calls
sessions_send(sessionKey="agent:builder:main", message="...")
- Builder processes the message and responds
- After this, builder's session in
~/.clawdbot/agents/builder/sessions/sessions.json shows "channel": "webchat" instead of "telegram"
- User sends a message to the builder Telegram bot → no response (message not routed to the session)
Expected Behavior
sessions_send should not modify the target session's channel field. The delivery context should remain unchanged — the session should continue to be associated with its original channel (Telegram).
Actual Behavior
The channel field is overwritten to "webchat" because sessions_send injects the message via the gateway (webchat transport), and this overwrites the session's channel association.
Workaround
Manually edit sessions.json to restore "channel": "telegram" and restart the gateway. This is fragile and not suitable for automation.
Impact
This prevents using sessions_send for agent-to-agent communication when the target agent uses Telegram. It breaks a key use case: a watchdog/supervisor agent relaunching a worker agent.
Environment
- Clawdbot version: 2026.1.24-3
- OS: Linux (Ubuntu)
- Channel: Telegram
- Config: agentToAgent enabled, multiple agents with separate Telegram bot accounts
Bug Description
sessions_sendfrom one agent to another changes the target session'schannelfield insessions.jsonfrom"telegram"to"webchat". This breaks Telegram message routing — the target agent stops receiving Telegram messages from the user.Steps to Reproduce
channel: "telegram"in sessions.json)sessions_send(sessionKey="agent:builder:main", message="...")~/.clawdbot/agents/builder/sessions/sessions.jsonshows"channel": "webchat"instead of"telegram"Expected Behavior
sessions_sendshould not modify the target session'schannelfield. The delivery context should remain unchanged — the session should continue to be associated with its original channel (Telegram).Actual Behavior
The
channelfield is overwritten to"webchat"becausesessions_sendinjects the message via the gateway (webchat transport), and this overwrites the session's channel association.Workaround
Manually edit
sessions.jsonto restore"channel": "telegram"and restart the gateway. This is fragile and not suitable for automation.Impact
This prevents using
sessions_sendfor agent-to-agent communication when the target agent uses Telegram. It breaks a key use case: a watchdog/supervisor agent relaunching a worker agent.Environment