Skip to content

[Bug] TUI: /new session replies broadcast to all connected TUI clients for the same agent #39217

@cyq1017

Description

@cyq1017

Bug type

Regression (worked before, now fails)

Summary

When two TUI windows are connected to the same agent, creating a new session with /new in one window causes the agent's replies to be broadcast to all connected TUI clients, not just the one that initiated the session.

Steps to reproduce

  1. Open terminal window A and connect to an agent via TUI: openclaw tui, then /agent main
  2. Open terminal window B and connect to the same agent: openclaw tui, then /agent main
  3. In window A, type /new to create a new session.
  4. Send a message in window A, e.g., "Hello".
  5. Observe: the agent's reply appears in both window A and window B.

Expected behavior

Each TUI client should maintain its own session context. Messages and replies in a session created by /new in window A should not appear in window B. Session-level isolation should be enforced.

Actual behavior

The agent's reply is broadcast to all connected TUI clients regardless of which client initiated the session.

OpenClaw version

2026.3.2

Operating system

macOS (Mac mini)

Install method

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions