openclaw - 💡(How to fix) Fix sessions_send reply routes to webchat instead of origin channel (Feishu) [1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#76104Fetched 2026-05-03 04:42:17
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1unsubscribed ×1

When a user sends a command (e.g., /compact) via Feishu direct message, and the command is processed via sessions_send, the reply routes to webchat channel instead of feishu.

This means:

  1. User triggers /compact in Feishu DM
  2. sessions_send processes the command
  3. Reply appears in OpenClaw Dashboard (webchat), not in Feishu DM
  4. User in Feishu sees no response

Root Cause

In openclaw-tools-DuqACH22.js, the sessions_send routing logic uses sourceChannel from params.requesterChannel. However, the session's channel field (= webchat) takes priority over deliveryContext.channel (= feishu) because entry.channel is checked first in the routing chain.

The session key for Feishu DM: agent:main:feishu:direct:ou_xxx

Session data shows:

  • channel: webchat (problem: session.channel != deliveryContext.channel)
  • origin.provider: feishu
  • deliveryContext.channel: feishu (correct but not used)

Fix Action

Workaround

Currently users must trigger commands from the Dashboard to get replies back to Dashboard.

RAW_BUFFERClick to expand / collapse

Bug Report: sessions_send reply routes to webchat instead of origin channel (Feishu)

Environment

  • OpenClaw version: 2026.4.29
  • Channel: Feishu (websocket mode)
  • Issue occur: When triggering sessions_send from Feishu DM

Description

When a user sends a command (e.g., /compact) via Feishu direct message, and the command is processed via sessions_send, the reply routes to webchat channel instead of feishu.

This means:

  1. User triggers /compact in Feishu DM
  2. sessions_send processes the command
  3. Reply appears in OpenClaw Dashboard (webchat), not in Feishu DM
  4. User in Feishu sees no response

Root Cause Analysis

In openclaw-tools-DuqACH22.js, the sessions_send routing logic uses sourceChannel from params.requesterChannel. However, the session's channel field (= webchat) takes priority over deliveryContext.channel (= feishu) because entry.channel is checked first in the routing chain.

The session key for Feishu DM: agent:main:feishu:direct:ou_xxx

Session data shows:

  • channel: webchat (problem: session.channel != deliveryContext.channel)
  • origin.provider: feishu
  • deliveryContext.channel: feishu (correct but not used)

Expected Behavior

Replies should route back to the origin channel where the message came from (Feishu DM), not to the session's internal channel field (webchat).

Reproduction Steps

  1. Connect OpenClaw with Feishu channel (websocket mode)
  2. Open Feishu DM with the bot
  3. Send any command (e.g., /compact)
  4. Check Dashboard — reply appears there
  5. Check Feishu DM — no reply received

Session Data (for debugging)

Session: agent:main:feishu:direct:ou_117720b5f6ed8e9e6da53a0f4ad25a3a

  • channel: webchat (problem)
  • origin.provider: feishu
  • deliveryContext.channel: feishu
  • deliveryContext.to: user:ou_117720b5f6ed8e9e6da53a0f4ad25a3a

Suggested Fix

In sessions_send routing, deliveryContext.channel should take higher priority than the session's channel field. Either:

  1. Prioritize origin.provider when it differs from session.channel
  2. Force deliveryContext.channel as the fallback when origin provider is set
  3. Add config flag for channel delivery fallback

Workaround

Currently users must trigger commands from the Dashboard to get replies back to Dashboard.

extent analysis

TL;DR

Prioritize deliveryContext.channel over the session's channel field in the sessions_send routing logic to fix the reply routing issue.

Guidance

  • Review the openclaw-tools-DuqACH22.js file and update the sessions_send routing logic to give higher priority to deliveryContext.channel when it differs from the session's channel field.
  • Consider adding a config flag for channel delivery fallback to provide more flexibility in handling different scenarios.
  • Verify the fix by testing the reproduction steps and checking that replies are now routed back to the origin channel (Feishu DM).
  • Ensure that the deliveryContext.channel value is correctly set and used in the routing logic.

Example

No code snippet is provided as the issue does not contain sufficient code details.

Notes

The suggested fix assumes that the deliveryContext.channel value is correctly set and reflects the origin channel of the message. Additional testing and verification may be necessary to ensure that the fix works as expected in all scenarios.

Recommendation

Apply the workaround by prioritizing deliveryContext.channel over the session's channel field, as this is the most direct way to address the issue and ensure that replies are routed back to the origin channel.

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 sessions_send reply routes to webchat instead of origin channel (Feishu) [1 comments, 2 participants]