-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
sessions_send reply routes to webchat instead of origin channel (Feishu) #76104
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Report: sessions_send reply routes to webchat instead of origin channel (Feishu)
Environment
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:
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:
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
Session Data (for debugging)
Session: agent:main:feishu:direct:ou_117720b5f6ed8e9e6da53a0f4ad25a3a
Suggested Fix
In sessions_send routing, deliveryContext.channel should take higher priority than the session's channel field. Either:
Workaround
Currently users must trigger commands from the Dashboard to get replies back to Dashboard.