openclaw - 💡(How to fix) Fix Bug: Inter-session (agent-to-agent) messages route to webchat channel instead of original Feishu channel, causing lost replies

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When an agent receives a sessions_send inter-session message while its active session is on the Feishu channel, the reply is routed through the webchat channel instead of the original Feishu channel. This causes the user to never see the reply in Feishu — the message appears to be "lost."

Root Cause

Root Cause Hypothesis

Fix Action

Workaround

The user has to manually ask the agent to resend the information, which then goes through the correct Feishu channel.

Code Example

# Inter-session message arrives with sourceChannel=webchat
"content": "[Inter-session message] sourceSession=agent:B:main sourceChannel=webchat sourceTool=sessions_"

# Agent B's reply goes to webchat channel
[agent:nested] session=agent:B:feishu:B:direct:ou_xxx run=xxx channel=webchat <reply content>

---

[feishu] feishu[B]: dispatch complete (queuedFinal=true, replies=1)
RAW_BUFFERClick to expand / collapse

Description

When an agent receives a sessions_send inter-session message while its active session is on the Feishu channel, the reply is routed through the webchat channel instead of the original Feishu channel. This causes the user to never see the reply in Feishu — the message appears to be "lost."

Environment

  • OpenClaw version: 2026.5.27 (commit 27ae826)
  • Channel: Feishu (Lark)
  • Multiple agents configured on the same OpenClaw instance (7 agents total)
  • tools.agentToAgent.enabled: true
  • tools.sessions.visibility: "all"

Steps to Reproduce

  1. Set up multiple agents on a single OpenClaw instance, each with its own Feishu bot
  2. User chats with Agent B via Feishu DM (session is agent:B:feishu:B:direct:ou_xxx)
  3. Agent A sends a message to Agent B using sessions_send(agentId="B", message="...")
  4. Agent B receives the inter-session message and generates a reply

Expected Behavior

Agent B's reply should be delivered back to the user via the Feishu channel, since the active session originated from Feishu.

Actual Behavior

Agent B's reply is routed through channel=webchat instead of channel=feishu. The user never sees the reply in Feishu.

Log Evidence

From journalctl logs, the key pattern is:

# Inter-session message arrives with sourceChannel=webchat
"content": "[Inter-session message] sourceSession=agent:B:main sourceChannel=webchat sourceTool=sessions_"

# Agent B's reply goes to webchat channel
[agent:nested] session=agent:B:feishu:B:direct:ou_xxx run=xxx channel=webchat <reply content>

Note the contradiction: the session key contains feishu (agent:B:feishu:B:direct:ou_xxx), but the response is tagged channel=webchat.

For comparison, when Agent B replies to a normal Feishu user message (not an inter-session message), it correctly uses the Feishu channel:

[feishu] feishu[B]: dispatch complete (queuedFinal=true, replies=1)

Root Cause Hypothesis

When an inter-session message is injected into an agent's session via sessions_send, the sourceChannel of that injected message is set to webchat. The agent's reply routing then follows this sourceChannel rather than the session's original channel (Feishu). This causes the reply to be "delivered" to the webchat channel, which has no connection to the Feishu conversation — so the user sees nothing.

The reply channel should respect the session's origin channel (Feishu), not the injected message's source channel.

Workaround

The user has to manually ask the agent to resend the information, which then goes through the correct Feishu channel.

Impact

This is a significant usability issue for multi-agent setups where agents communicate via sessions_send while the user is interacting through Feishu. The user sees messages disappearing or agents appearing unresponsive, when in reality the replies are being sent to a disconnected channel.

Frequency

Intermittent — it occurs specifically when the agent's reply is triggered by or strongly influenced by an inter-session message. If the user sends a follow-up message after the inter-session message arrives, the reply sometimes routes correctly through Feishu.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bug: Inter-session (agent-to-agent) messages route to webchat channel instead of original Feishu channel, causing lost replies