openclaw - 💡(How to fix) Fix [Bug]: Slack async exec completion still escapes originating thread [2 comments, 2 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#72277Fetched 2026-04-27 05:32:10
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
1
Participants
Timeline (top)
commented ×2cross-referenced ×1

A Slack channel-thread async exec completion reply still escapes the originating Slack thread and posts as a top-level channel message on OpenClaw 2026.4.24 (cbcfdf6).

This is the v2026.4.24+ follow-up requested in #72151 after that issue was closed as already implemented.

Root Cause

A Slack channel-thread async exec completion reply still escapes the originating Slack thread and posts as a top-level channel message on OpenClaw 2026.4.24 (cbcfdf6).

This is the v2026.4.24+ follow-up requested in #72151 after that issue was closed as already implemented.

Code Example

python3 - <<'PY'
   import time
   time.sleep(2)
   print('ROUTING_REPRO_MARKER_20260426_1821_V24')
   PY

---

ROUTING_REPRO_MARKER_20260426_1821_V24

---

{
  "channel": "slack",
  "lastChannel": "slack",
  "lastTo": "channel:<redacted-channel>",
  "lastThreadId": "1777136297.410919",
  "deliveryContext": {
    "channel": "slack",
    "to": "channel:<redacted-channel>",
    "accountId": "default",
    "threadId": "1777136297.410919"
  }
}

---

{
  "chat_id": "<redacted-channel>"
}

---

{
  "channels": {
    "slack": {
      "replyToModeByChatType": {
        "channel": "all"
      },
      "thread": {
        "requireExplicitMention": true
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

A Slack channel-thread async exec completion reply still escapes the originating Slack thread and posts as a top-level channel message on OpenClaw 2026.4.24 (cbcfdf6).

This is the v2026.4.24+ follow-up requested in #72151 after that issue was closed as already implemented.

Steps to reproduce

  1. Start OpenClaw 2026.4.24 (cbcfdf6) with Slack enabled and channel thread replies configured.

  2. In Slack, send a message to the assistant inside an existing channel thread.

  3. In that threaded assistant turn, start an exec command that completes after the assistant turn returns.

  4. Exact command used:

    python3 - <<'PY'
    import time
    time.sleep(2)
    print('ROUTING_REPRO_MARKER_20260426_1821_V24')
    PY

    The command was started with a very short foreground wait so OpenClaw returned before completion and later injected the async completion event.

  5. Wait for the async completion event.

  6. Let the assistant relay the completion output back to Slack.

Expected behavior

The async completion relay should be posted in the original Slack thread that started the command.

Actual behavior

The async completion relay posted as a top-level channel message instead of staying in the original Slack thread.

Observed marker:

ROUTING_REPRO_MARKER_20260426_1821_V24

Repro evidence

  • OpenClaw version: 2026.4.24 (cbcfdf6)
  • Origin Slack thread timestamp: 1777136297.410919
  • A normal assistant reply immediately before the async completion did post inside that thread.
  • The async completion relay containing ROUTING_REPRO_MARKER_20260426_1821_V24 posted at channel root instead.
  • Leaked top-level Slack message timestamp: 1777220556.388089
  • Local session key shape: agent:main:slack:channel:<redacted-channel>:thread:1777136297.410919

Route metadata observed

Persisted session routing context looked correct:

{
  "channel": "slack",
  "lastChannel": "slack",
  "lastTo": "channel:<redacted-channel>",
  "lastThreadId": "1777136297.410919",
  "deliveryContext": {
    "channel": "slack",
    "to": "channel:<redacted-channel>",
    "accountId": "default",
    "threadId": "1777136297.410919"
  }
}

But the injected async completion turn metadata visible to the assistant contained only channel-level context, not the original thread route:

{
  "chat_id": "<redacted-channel>"
}

It did not include the originating Slack thread_ts / OpenClaw threadId in that visible async completion envelope, and the final relay was delivered at channel root.

Relevant config

{
  "channels": {
    "slack": {
      "replyToModeByChatType": {
        "channel": "all"
      },
      "thread": {
        "requireExplicitMention": true
      }
    }
  }
}

Related issues

  • #72151 was closed as already implemented, with a request to file a fresh regression if this reproduced on v2026.4.24 or later.
  • #62736 is related historical thread-routing context, but this repro is specifically async exec completion delivery.

extent analysis

TL;DR

The async completion relay is not posting in the original Slack thread due to missing thread context in the injected async completion turn metadata.

Guidance

  • The issue seems to be related to the async completion turn metadata not containing the original thread route, causing the relay to be delivered at the channel root instead of the thread.
  • Verify that the threadId is being correctly persisted in the session routing context and passed to the async completion turn metadata.
  • Check the configuration of replyToModeByChatType and requireExplicitMention in the Slack channel settings to ensure they are not causing the thread context to be lost.
  • Investigate why the async completion envelope only contains channel-level context and not the originating Slack thread_ts / OpenClaw threadId.

Example

No code snippet is provided as the issue seems to be related to the metadata and configuration rather than a specific code implementation.

Notes

The issue is specific to the async exec completion delivery and not a general thread-routing issue, as evidenced by the normal assistant reply posting correctly in the thread.

Recommendation

Apply a workaround to ensure the async completion turn metadata includes the original thread route, such as modifying the configuration or adding custom logic to persist the threadId in the session routing context.

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

The async completion relay should be posted in the original Slack thread that started the command.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING