-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: sessions_send unexpectedly injects label, causing mutual-exclusion error with sessionKey #64699
Copy link
Copy link
Closed
BingqingLyu/openclaw
#2317Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.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.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.staleMarked as stale due to inactivityMarked as stale due to inactivity
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.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.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.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When calling sessions_send, the effective invocation appears to include label even when the caller intends to send only by sessionKey.
调用 sessions_send 时,实际执行链路中疑似会被自动补入 label,即使调用方本意只传 sessionKey。这会导致本来合法的调用触发互斥报错。
This was observed from both:
ClawX session path
OpenClaw Control UI path
该问题同时在以下两条路径观察到:
ClawX 会话路径
OpenClaw Control UI 路径
This suggests the bug is not specific to ClawX, but likely exists in a shared invocation / argument assembly layer.
这说明问题并非 ClawX 私有,更可能存在于共享的调用封装或参数组装层。
Steps to reproduce
sessions_sendtargetingagent:tywin:main.sessionKeywith messagetest.sessionKeyandlabel.Provide either sessionKey or label (not both).Expected behavior
A
sessions_sendcall intended to route bysessionKeyshould execute without silently addinglabel.Actual behavior
Observed emitted call:
{
"sessionKey": "agent:tywin:main",
"label": "agent:tywin:main",
"agentId": "main",
"message": "test",
"timeoutSeconds": 30
}
Observed tool error:
Provide either sessionKey or label (not both).OpenClaw version
2026.4.9
Operating system
macOS 15.5
Install method
mac app (ClawX embedded OpenClaw runtime)
Model
openrouter/openai/gpt-5.4
Provider / routing chain
Multiple client paths reproduced the same behavior: - ClawX -> embedded OpenClaw runtime -> sessions_send tool - OpenClaw Control UI -> embedded OpenClaw runtime -> sessions_send tool
Additional provider/model setup details
The same behavior was observed through both ClawX and OpenClaw Control UI, so this does not appear to be a ClawX-only client bug.
Logs, screenshots, and evidence
Impact and severity
Affected: users trying to send cross-session messages with
sessions_sendSeverity: Medium
Frequency: Observed in direct testing
Consequence:
sessions_sendfails before delivery because the emitted arguments violate the tool's mutual-exclusion ruleAdditional information
This was observed on OpenClaw 2026.4.9 in a ClawX embedded runtime.
The issue report is focused on the apparent argument mutation/injection behavior:
a call intended to route by
sessionKeyappears to fail as if bothsessionKeyandlabelwere present in the final invocation.A separate policy denial was also observed later, but that is likely a different issue. This report is only for the mutual-exclusion failure path.