Skip to content

Block streaming 'off' mode still sends per-turn block replies to Slack #12714

@agent-bingus

Description

@agent-bingus

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:

  1. Line 60613-60616: blockStreamingEnabled correctly resolves to false when streaming is off
  2. Line 62260-62297: The onBlockReply wrapper correctly gates per-delta emissions on blockStreamingEnabled — when false, the wrapper is a no-op
  3. BUT Line 54278-54287: The text_end handler calls emitBlockChunkparams.onBlockReply, which invokes the wrapper. Since the wrapper is a no-op, this should be fine.
  4. AND Line 54362: The message_end handler similarly calls onBlockReply through 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)

  1. blockStreamingDefault: "off" + blockStreamingBreak: "message_end" + Slack blockStreaming: false → 10+ messages per response
  2. blockStreamingDefault: "off" + no break override + Slack blockStreaming: false → 10+ messages
  3. blockStreamingDefault: "on" + blockStreamingBreak: "message_end" + blockStreamingCoalesce: {minChars: 50000, maxChars: 100000, idleMs: 30000} + Slack blockStreaming: 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdedupe:childDuplicate issue/PR child in dedupe clusterstaleMarked as stale due to inactivity

    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