-
-
Notifications
You must be signed in to change notification settings - Fork 69k
Block streaming 'off' mode still sends per-turn block replies to Slack #12714
Description
Description
When blockStreamingDefault: "off" is configured with channels.slack.blockStreaming: false, the agent still sends multiple Slack messages per response — one for each model turn (text before tool_use). This contradicts the docs which state "No block streaming: blockStreamingDefault: off (only final reply)."
Source Code Analysis
In reply-B_4pVbIX.js:
- Line 60613-60616:
blockStreamingEnabledcorrectly resolves tofalsewhen streaming is off - Line 62260-62297: The
onBlockReplywrapper correctly gates per-delta emissions onblockStreamingEnabled— when false, the wrapper is a no-op - BUT Line 54278-54287: The
text_endhandler callsemitBlockChunk→params.onBlockReply, which invokes the wrapper. Since the wrapper is a no-op, this should be fine. - AND Line 54362: The
message_endhandler similarly callsonBlockReplythrough the wrapper.
Despite the wrapper being a no-op in theory, gateway logs confirm 10+ delivered reply events per agent response in Slack channels. The messages match the text output between each tool call cycle.
Configs Tried (all failed)
blockStreamingDefault: "off"+blockStreamingBreak: "message_end"+ SlackblockStreaming: false→ 10+ messages per responseblockStreamingDefault: "off"+ no break override + SlackblockStreaming: false→ 10+ messagesblockStreamingDefault: "on"+blockStreamingBreak: "message_end"+blockStreamingCoalesce: {minChars: 50000, maxChars: 100000, idleMs: 30000}+ SlackblockStreaming: true→ 3 messages (coalescing helped but message_end handler appears to bypass the pipeline at line 54362)
Expected Behavior
With blockStreamingDefault: "off", only the final reply should be delivered to Slack. All intermediate text between tool calls should be silently dropped or accumulated for the final response.
Actual Behavior
Every text block before a tool_use in the agent loop is delivered as a separate Slack message, regardless of block streaming config.
Environment
- OpenClaw 2026.2.6-3
- Channel: Slack (socket mode)
- Model: claude-opus-4-6 (Anthropic)
- Session type: Slack channel threads (ChatType: "channel")
Gateway Logs
2026-02-09T13:56:04.439Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:04.615Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:04.803Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:04.982Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:05.163Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:05.479Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:05.659Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:05.828Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:06.020Z [slack] delivered reply to channel:C0AC5627A6N
2026-02-09T13:56:06.208Z [slack] delivered reply to channel:C0AC5627A6N
All 10 were from a single agent response with multiple tool calls.