openclaw - 💡(How to fix) Fix Slack block_actions not dispatched as inbound messages — buttons never wake session [1 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#56142Fetched 2026-04-08 01:44:27
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Slack button clicks (block_actions) are handled via enqueueSystemEvent() but never wake the agent session. The event sits in the queue until the next human message arrives, making interactive buttons effectively dead.

This was previously reported in #21221 (auto-closed by stale bot — the bug is still present).

Root Cause

In registerSlackEvents(), handleSlackMessage is passed to registerSlackMessageEvents() but not to registerSlackInteractionEvents():

// Line ~18616 — message events get handleSlackMessage ✅
registerSlackMessageEvents({
    ctx: params.ctx,
    handleSlackMessage: params.handleSlackMessage
});

// Line ~18634 — interaction events do NOT ❌
registerSlackInteractionEvents({ ctx: params.ctx });

Fix Action

Workaround

We have a working local patch that applies the above fix to the dist files after each npm update. Happy to share if helpful.

Code Example

// Line ~18616 — message events get handleSlackMessage ✅
registerSlackMessageEvents({
    ctx: params.ctx,
    handleSlackMessage: params.handleSlackMessage
});

// Line ~18634 — interaction events do NOT ❌
registerSlackInteractionEvents({ ctx: params.ctx });

---

await handleSlackMessage({
    type: "message",
    user: userId,
    channel: channelId,
    text: `Slack interaction: ${JSON.stringify(eventPayload)}`,
    ts: String(Date.now() / 1000),
    thread_ts: threadTs ?? messageTs
}, { source: "block_action", wasMentioned: true });
RAW_BUFFERClick to expand / collapse

Summary

Slack button clicks (block_actions) are handled via enqueueSystemEvent() but never wake the agent session. The event sits in the queue until the next human message arrives, making interactive buttons effectively dead.

This was previously reported in #21221 (auto-closed by stale bot — the bug is still present).

Current behavior (v2026.3.24)

  1. Agent posts a Slack message with Block Kit buttons
  2. User clicks a button
  3. block_actions handler fires, calls enqueueSystemEvent(formatSlackInteractionSystemEvent(eventPayload), { sessionKey, contextKey })
  4. Nothing happens — no session wake, no response
  5. Next time a human sends a message, the queued system event finally gets processed

Expected behavior

Button clicks should dispatch as real inbound messages (like Telegram callback_query does), waking the session immediately.

Root cause

In registerSlackEvents(), handleSlackMessage is passed to registerSlackMessageEvents() but not to registerSlackInteractionEvents():

// Line ~18616 — message events get handleSlackMessage ✅
registerSlackMessageEvents({
    ctx: params.ctx,
    handleSlackMessage: params.handleSlackMessage
});

// Line ~18634 — interaction events do NOT ❌
registerSlackInteractionEvents({ ctx: params.ctx });

Suggested fix

  1. Pass handleSlackMessage into registerSlackInteractionEvents()
  2. In the block_actions handler, call handleSlackMessage() with a synthetic message (similar to how Telegram dispatches callback_query):
await handleSlackMessage({
    type: "message",
    user: userId,
    channel: channelId,
    text: `Slack interaction: ${JSON.stringify(eventPayload)}`,
    ts: String(Date.now() / 1000),
    thread_ts: threadTs ?? messageTs
}, { source: "block_action", wasMentioned: true });

This mirrors the Telegram pattern where callback_query is dispatched as a real message with wasMentioned: true.

Workaround

We have a working local patch that applies the above fix to the dist files after each npm update. Happy to share if helpful.

Environment

  • OpenClaw v2026.3.24
  • Slack channel (Socket Mode)
  • Block Kit buttons via chat.postMessage
  • macOS, Node v25.5.0

Related

  • #21221 (same issue, auto-closed by stale bot)

extent analysis

Fix Plan

To fix the issue with Slack button clicks not waking the agent session, follow these steps:

  • Pass handleSlackMessage into registerSlackInteractionEvents():
registerSlackInteractionEvents({ 
  ctx: params.ctx, 
  handleSlackMessage: params.handleSlackMessage 
});
  • In the block_actions handler, call handleSlackMessage() with a synthetic message:
await handleSlackMessage({
  type: "message",
  user: userId,
  channel: channelId,
  text: `Slack interaction: ${JSON.stringify(eventPayload)}`,
  ts: String(Date.now() / 1000),
  thread_ts: threadTs ?? messageTs
}, { 
  source: "block_action", 
  wasMentioned: true 
});

Verification

To verify that the fix worked:

  1. Deploy the updated code to your production environment.
  2. Test the Slack button clicks by clicking on a Block Kit button.
  3. Verify that the agent session wakes up immediately and responds to the button click.

Extra Tips

  • Make sure to update the registerSlackInteractionEvents() function to include the handleSlackMessage parameter.
  • Test the fix thoroughly to ensure that it works as expected in different scenarios.
  • Consider implementing a similar fix for other interaction events, such as shortcut or command events.

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

Button clicks should dispatch as real inbound messages (like Telegram callback_query does), waking the session immediately.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING