openclaw - ✅(Solved) Fix [Bug]: Multi-agent setup in Slack: Enabling streaming to "partial" causes default agent to respond in channels bound to another agent [1 pull requests, 2 comments, 3 participants]

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…
GitHub stats
openclaw/openclaw#50976Fetched 2026-04-08 01:06:02
View on GitHub
Comments
2
Participants
3
Timeline
10
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2cross-referenced ×2unlabeled ×2

When streaming is set to partial (with nativeStreaming: true) in a multi-agent Slack setup, the default agent starts responding in channels that are explicitly bound to a different agent via the bindings config.

Root Cause

When streaming is set to partial (with nativeStreaming: true) in a multi-agent Slack setup, the default agent starts responding in channels that are explicitly bound to a different agent via the bindings config.

Fix Action

Fix / Workaround

Workaround: Set streaming: "off" — only the correct agent responds

PR fix notes

PR #56677: fix(slack): enforce streaming mode mutual exclusion + guard stream teardown

Description (problem / solution / changelog)

Fixes #56675 Related: #54469, #23791

Problem

Slack has three independent streaming mechanisms (native streaming, draft preview, block streaming) that can be active simultaneously, causing duplicate message delivery. Only one mutual exclusion rule was enforced:

Native streaming ON → block streaming OFF  ✅ (already existed)
Draft preview ON → block streaming OFF     ❌ (not enforced)

When draft preview and block streaming run together:

  1. Block replies arrive as separate messages
  2. Draft preview gets finalized via chat.update into a permanent message
  3. User sees the same content twice

Fix

Two changes in dispatch.ts:

1. Enforce mutual exclusion: draft preview → disable block streaming

disableBlockStreaming: useStreaming
  ? true
  : previewStreamingEnabled
    ? true  // NEW: draft preview ON → no block streaming
    : typeof account.config.blockStreaming === "boolean"
      ? !account.config.blockStreaming
      : undefined,

2. Guard stopSlackStream against unflushed state

When the stream session exists but the streamer was never initialized (e.g., startStream failed), stopSlackStream would attempt to start a new stream to flush the buffer. Now checks finalStream.streamer before calling stop.

What this does NOT fix (separate PRs needed)

  • #52536 — Thread target for streaming (needs thread_ts plumbing change)
  • #50976 — Multi-agent streaming routing (needs session scoping)
  • #55445 — Bolt middleware self-filter (needs middleware change)

Testing

  • Zero type errors
  • Backward compatible: configs that only use one streaming mode are unaffected
  • Configs that accidentally enabled both modes now get correct single-mode behavior

AI Disclosure

🤖 AI-assisted (Kiro CLI).

Changed files

  • extensions/slack/src/monitor/message-handler/dispatch.ts (modified, +12/-4)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

When streaming is set to partial (with nativeStreaming: true) in a multi-agent Slack setup, the default agent starts responding in channels that are explicitly bound to a different agent via the bindings config.

Steps to reproduce

Setup:

• Two agents: main (default) and n1773925372104 (X Profile) • Channel C0AM5NWDCRM is bound exclusively to X Profile via bindings • requireMention: false on that channel

Steps to reproduce:

  1. Configure a channel binding routing a Slack channel to a non-default agent
  2. Set channels.slack.streaming: "partial" and channels.slack.nativeStreaming: true
  3. Restart OpenClaw and send a message to the bound channel

Expected: Only the bound agent (X Profile) responds

Actual: Both the bound agent and the default (main) agent respond

Workaround: Set streaming: "off" — only the correct agent responds

Config snippet:

{ "agents": { "defaults": { "model": { "primary": "anthropic/claude-sonnet-4-6" } }, "list": [ { "id": "n1773925372104", "name": "X Profile", "workspace": "/home/ubuntu/n1773925372104-agent", "identity": { "name": "X Profile", "emoji": "🤖" }, "skills": [ "documenting-tasks" ], "groupChat": { "mentionPatterns": [ "X Profile", "x profile", "x-profile", "XProfile" ] } }, { "id": "main", "default": true, "workspace": "/home/ubuntu/.openclaw/workspace", "groupChat": { "mentionPatterns": [ "Cody", "@Cody" ] } } ] }, "channels": { "slack": { "mode": "http", "botToken": "xoxb-", "appToken": "xapp-", "signingSecret": "", "webhookPath": "/slack/events", "enabled": true, "userTokenReadOnly": false, "groupPolicy": "open", "dmPolicy": "open", "allowFrom": [ "*" ], "nativeStreaming": true, "streaming": "partial", "commands": { "native": true }, "channels": { "C0AM5NWDCRM": { "requireMention": false }, "C073RBJDYGY": { "requireMention": true }, "C073RDV695W": { "requireMention": true }, "C074U8ECD3Q": { "requireMention": true }, "C08AE52P4KW": { "requireMention": true } } } }, "bindings": [ { "agentId": "n1773925372104", "match": { "channel": "slack", "peer": { "kind": "group", "id": "C0AM5NWDCRM" } } }, { "agentId": "main", "match": { "channel": "slack", "peer": { "kind": "group", "id": "C08AE52P4KW" } } } ] }

Expected behavior

When streaming is off, only the agent bound to the channel responds. When streaming is partial, the response is either duplicated, showing the subagent and the main agent sending the same response, or only the main agent responding.

Actual behavior

Only the agent bound to the channel should respond when streaming is partial.

OpenClaw version

OpenClaw version: 2026.3.11

Operating system

Ubuntu 24.04

Install method

No response

Model

Claude Sonnet 4.6

Provider / routing chain

openclaw

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

<img width="1218" height="648" alt="Image" src="https://github.com/user-attachments/assets/c3a41664-16d6-4b11-8e5d-c98abd2c0aa5" />

extent analysis

Fix Plan

To resolve the issue of the default agent responding in channels bound to a different agent via the bindings config when streaming is set to partial, we need to modify the OpenClaw configuration.

  1. Update the bindings configuration: Ensure that the bindings are correctly set up to route messages to the intended agents.
  2. Modify the channel configuration: Update the channel configuration to include the agentId for each channel, specifying which agent should respond to messages in that channel.
  3. Disable native streaming for specific channels: If necessary, disable native streaming for channels that should only be handled by a specific agent.

Example configuration updates:

"bindings": [
  {
    "agentId": "n1773925372104",
    "match": {
      "channel": "slack",
      "peer": {
        "kind": "group",
        "id": "C0AM5NWDCRM"
      }
    }
  }
]

"channels": {
  "slack": {
    "channels": {
      "C0AM5NWDCRM": {
        "requireMention": false,
        "agentId": "n1773925372104"
      }
    }
  }
}

Verification

To verify that the fix worked, restart OpenClaw and send a message to the bound channel. Only the bound agent should respond.

Extra Tips

  • Ensure that the agentId in the bindings and channel configurations match the id of the intended agent.
  • If issues persist, check the OpenClaw logs for any errors or warnings related to the bindings or channel configurations.
  • Consider testing with different streaming settings to ensure the desired behavior is achieved.

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

When streaming is off, only the agent bound to the channel responds. When streaming is partial, the response is either duplicated, showing the subagent and the main agent sending the same response, or only the main agent responding.

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 - ✅(Solved) Fix [Bug]: Multi-agent setup in Slack: Enabling streaming to "partial" causes default agent to respond in channels bound to another agent [1 pull requests, 2 comments, 3 participants]