Skip to content

[Bug]: Slack block streaming fails with missing_recipient_team_id in multi-account setup #19791

@tamaitakamasa

Description

@tamaitakamasa

Summary

Slack channel responses fail silently with missing_recipient_team_id API error when using block streaming in a multi-account (multi-workspace) Slack configuration. DMs work fine; only channel delivery is affected.

Steps to reproduce

  1. Configure two Slack workspaces via channels.slack.accounts (both using socket mode)
  2. Enable block streaming (default in v2026.2.15)
  3. Send a message in a channel (#99_オモイカネ) on the secondary account
  4. Agent processes the message successfully but response is never delivered

Expected behavior

Agent response should be delivered to the Slack channel.

Actual behavior

  • Message is received and processed (lane enqueuelane dequeuelane task done all succeed)
  • Response delivery fails with: slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id
  • No message appears in the channel
  • DMs on the same account work correctly
  • Setting blockStreamingDefault: "off" does NOT fix the issue — the stream code path is still invoked

Error Logs

2026-02-18T04:36:42.057Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id
2026-02-18T04:42:07.227Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id
2026-02-18T04:45:06.990Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id
2026-02-18T04:47:19.091Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id
2026-02-18T04:51:17.482Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id  # ← after blockStreamingDefault: "off"
2026-02-18T04:56:20.500Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id
2026-02-18T05:01:16.804Z [gateway/channels/slack] slack-stream: failed to stop stream: Error: An API error occurred: missing_recipient_team_id

Note: The error persists even after setting blockStreamingDefault: "off" and restarting, suggesting the stream code path is still used for channel delivery.

Diagnostic Evidence

Processing is successful (from detailed logs):

lane enqueue: lane=session:agent:food-shared:slack:channel:c0ac1qqsxdz queueSize=1
lane dequeue: lane=session:agent:food-shared:slack:channel:c0ac1qqsxdz waitMs=3 queueSize=0
lane task done: lane=session:agent:food-shared:slack:channel:c0ac1qqsxdz durationMs=2757

Configuration

{
  "agents": {
    "defaults": {
      "blockStreamingDefault": "off"
    }
  },
  "channels": {
    "slack": {
      "mode": "socket",
      "enabled": true,
      "accounts": {
        "food": {
          "mode": "socket",
          "groupPolicy": "allowlist",
          "dmPolicy": "allowlist",
          "channels": {
            "#99_オモイカネ": {
              "allow": true,
              "requireMention": false
            }
          }
        },
        "shimatoworks": {
          "mode": "socket",
          "groupPolicy": "allowlist",
          "dmPolicy": "pairing",
          "channels": {
            "#99_オモイカネ": {
              "allow": true
            }
          }
        }
      }
    }
  }
}

Environment

  • OpenClaw: 2026.2.15
  • OS: macOS (arm64, Darwin 25.2.0)
  • Node: v25.5.0
  • Slack mode: Socket mode (both accounts)
  • Model: claude-opus-4-6

Analysis

The missing_recipient_team_id Slack API error suggests the streaming API call is missing the team_id parameter, which is required when a bot is installed in multiple workspaces. The stream start/stop calls likely need to include the team context for the target workspace.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    close:duplicateClosed as duplicatededupe:childDuplicate issue/PR child in dedupe clusterduplicateThis issue or pull request already exists

    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