openclaw - 💡(How to fix) Fix [Bug]: WebSocket sessions.send Creates Wrong Session Context (Group vs Direct) [1 pull requests]

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…

Issue: WebSocket sessions.send Creates Wrong Session Context (Group vs Direct) Summary: When calling sessions.send via WebSocket API, tools don't appear in web UI session key direct session. Instead, a new group session is created, causing incorrect session context. Symptoms:

  • WS sessions.send triggers agent processing
  • session.tool event fires but tools don't appear in web UI direct session
  • New group session is created instead of using existing direct session
  • Tool responses route to wrong session context Expected: Tools should appear and execute within the same direct session context that exists in web UI, not create a new group session.
<img width="601" height="118" alt="Image" src="https://github.com/user-attachments/assets/6a54c242-c9b4-40e7-9f8e-afa4b537d8c3" />

Root Cause

Issue: WebSocket sessions.send Creates Wrong Session Context (Group vs Direct) Summary: When calling sessions.send via WebSocket API, tools don't appear in web UI session key direct session. Instead, a new group session is created, causing incorrect session context. Symptoms:

  • WS sessions.send triggers agent processing
  • session.tool event fires but tools don't appear in web UI direct session
  • New group session is created instead of using existing direct session
  • Tool responses route to wrong session context Expected: Tools should appear and execute within the same direct session context that exists in web UI, not create a new group session.
<img width="601" height="118" alt="Image" src="https://github.com/user-attachments/assets/6a54c242-c9b4-40e7-9f8e-afa4b537d8c3" />

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Issue: WebSocket sessions.send Creates Wrong Session Context (Group vs Direct) Summary: When calling sessions.send via WebSocket API, tools don't appear in web UI session key direct session. Instead, a new group session is created, causing incorrect session context. Symptoms:

  • WS sessions.send triggers agent processing
  • session.tool event fires but tools don't appear in web UI direct session
  • New group session is created instead of using existing direct session
  • Tool responses route to wrong session context Expected: Tools should appear and execute within the same direct session context that exists in web UI, not create a new group session.
<img width="601" height="118" alt="Image" src="https://github.com/user-attachments/assets/6a54c242-c9b4-40e7-9f8e-afa4b537d8c3" />

Steps to reproduce

  1. Connect WebSocket client to openclaw server with ed25519 keys, protocol 4
  2. Call sessions.send with message content and session key format: agent:main:<channel>:direct:<wechat-id>@im.wechat
  3. Observe: session.tool event fires but tools appear in new group session, not existing direct session

Expected behavior

Tools should execute within the same direct session context that exists in web UI.

Actual behavior

2 sessions: direct & group

OpenClaw version

2026.5.12

Operating system

debian

Install method

empty

Model

empty

Provider / routing chain

empty

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

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…

FAQ

Expected behavior

Tools should execute within the same direct session context that exists in web UI.

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]: WebSocket sessions.send Creates Wrong Session Context (Group vs Direct) [1 pull requests]