Skip to content

[Bug]: message tool 'read' action does not forward threadId to Slack plugin #27798

@lairtonlelis

Description

@lairtonlelis

Summary

The generic message tool's read action cannot read Slack thread replies. When threadId is passed, it is silently ignored and channel-level messages are returned instead.

Status: ✅ Fixed on main, pending release

Fixed by PR #17017 (merged 2026-02-26). The latest release (2026.2.25) was published before the merge. Waiting on the next release to ship the fix. Release requested on the PR.

Steps to reproduce

  1. Have a Slack message with thread replies
  2. Use the message tool with action: "read", target: "<channel>", threadId: "<thread_ts>"
  3. Observe that only channel-level messages are returned, not thread replies

Root cause

In extensions/slack/src/channel.ts, the handleAction for read manually built the readMessages params and did not include threadId:

if (action === "read") {
    return await getSlackRuntime().channel.slack.handleSlackAction({
        action: "readMessages",
        channelId: resolveChannelId(),
        limit,
        before, after, accountId
        // threadId was MISSING
    }, cfg);
}

The underlying readSlackMessages function already supports threadId (calls conversations.replies). The parameter just never reached it.

Fix (PR #17017)

The inline handleAction was replaced with handleSlackMessageAction from plugin-sdk, which properly forwards threadId when includeReadThreadId: true:

actions: {
    handleAction: async (ctx) =>
        await handleSlackMessageAction({
            providerId: meta.id,
            ctx,
            includeReadThreadId: true,
            invoke: async (action, cfg, toolContext) =>
                await getSlackRuntime().channel.slack.handleSlackAction(action, cfg, toolContext),
        }),
},

Environment

  • Affected versions: ≤ 2026.2.25
  • Fixed on: main (commit d0d83a2)
  • Fix release: pending

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions