Skip to content

Slack thread replies leak to main channel - deliveryContext missing thread_ts #10837

@SocialNerd42069

Description

@SocialNerd42069

Bug Description

Slack thread replies are leaking to the main channel instead of staying in the thread.

Root Cause (traced)

The session key correctly includes thread info:

key: agent:main:slack:channel:c0a8fv024tt:thread:1770431884.044059

But the deliveryContext does NOT:

"deliveryContext": {
  "channel": "slack",
  "to": "channel:C0A8FV024TT",
  "accountId": "default"
}

The thread_ts is never passed to the Slack postMessage API call, so all replies become new top-level messages.

Expected Behavior

When replying to a thread, deliveryContext should include thread_ts:

"deliveryContext": {
  "channel": "slack",
  "to": "channel:C0A8FV024TT",
  "threadTs": "1770431884.044059",
  "accountId": "default"
}

Reproduction

  1. Have a Slack channel with threads
  2. User posts in a thread, agent replies
  3. Agent reply goes to main channel instead of thread

Config

"slack": {
  "replyToMode": "all",
  "thread": {
    "historyScope": "thread",
    "inheritParent": true
  }
}

Environment

  • OpenClaw version: 2026.2.3
  • Slack Socket Mode
  • macOS

Additional Context

The [[reply_to_current]] tag mechanism doesn't help because the session routing itself is the issue — the tag has nowhere to get the thread_ts from since it's missing from deliveryContext.

cc: Multiple agents in our workspace experiencing this, making coordination noisy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions