Skip to content

Feature: Separate tool event streaming from channel verbose mode #8901

@a-b13

Description

@a-b13

Problem

The verboseDefault config setting currently controls two distinct behaviors:

  1. Channel verbose output — Sending tool call details as messages in Telegram/Discord/etc.
  2. WebSocket event broadcasting — Emitting agent events with stream: "tool" to connected operator/webchat clients.

When verboseDefault: "off", both are suppressed. This means custom status pages (or any external WebSocket client) cannot receive tool events without also enabling verbose messages on messaging channels.

Why this matters

Many users are building status dashboards and monitoring pages that connect to the Gateway WebSocket as operator clients. These dashboards benefit enormously from real-time tool event data (which tool is running, file paths, commands, search queries, etc.) — but the user doesn't want their Telegram/Discord chat spammed with verbose tool call messages.

The current code in server-chat.js (shouldEmitToolEvents()) checks the verbose level and returns early if it's off:

if (evt.stream === "tool" && !shouldEmitToolEvents(evt.runId, sessionKey)) {
    agentRunSeq.set(evt.runId, evt.seq);
    return;
}

Proposed solution

Decouple WebSocket event broadcasting from channel verbose mode. Options:

  1. Always broadcast tool events to WebSocket operator clients — Let the client filter. Channel verbose only controls what gets sent as chat messages.
  2. Add a separate config option like agents.defaults.streamToolEvents: true that controls WS broadcasting independently.
  3. Per-scope filtering — Clients with operator.admin scope always receive tool events regardless of verbose setting.

Option 1 seems simplest and most flexible — clients that don't want tool events can ignore them. The verbose setting would only affect channel message output.

Environment

  • OpenClaw 2026.2.1
  • Status page connecting via ws://127.0.0.1:18789 with mode: "webchat", role: "operator"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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