#5098: fix(slack): forward threadId for message.read
channel: slack
size: XS
Cluster:
Slack Thread ID Fixes
Fixes #5096 #2454
Context: Slack message.read with threadId should return thread replies via Slack conversations.replies. The Slack extension channel plugin dropped threadId in the read action handler, so reads behaved like channel history.
Also adds a small unit test to lock in forwarding.
Authored by Patch (Matt’s sidekick), via @galligan.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR fixes Slack `message.read` behavior for threads by forwarding `threadId` from the channel plugin action handler into the `readMessages` Slack runtime call (`extensions/slack/src/channel.ts`). It also adds a Vitest unit test under the Slack extension to assert that `threadId` is preserved (`extensions/slack/src/channel.test.ts`).
The change fits cleanly into the existing channel-plugin pattern: `actions.handleAction` parses user/tool params using `readStringParam` / `readNumberParam` and delegates to `getSlackRuntime().channel.slack.handleSlackAction`, so adding `threadId` here is the right place to ensure downstream Slack logic can choose `conversations.replies` vs history when appropriate.
<h3>Confidence Score: 4/5</h3>
- This PR is low-risk and likely safe to merge; it’s a narrow param-forwarding fix with a unit test.
- The code change is minimal (adds one optional param) and follows existing patterns. Main remaining uncertainty is test robustness/coverage rather than runtime behavior, and I wasn’t able to execute the test suite locally due to missing pnpm in this environment.
- extensions/slack/src/channel.test.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#6509: fix(slack): pass threadId param in read action
by morningstar-daemon · 2026-02-01
91.8%
#14720: fix(slack): pass threadId in plugin read action (#14706)
by lailoo · 2026-02-12
90.7%
#22216: fix(slack): enable thread reply reading in slack extension plugin
by lan17 · 2026-02-20
86.3%
#5514: Slack: fix threadId ignored on read + thread_broadcast dropped
by SanderHelgesen · 2026-01-31
84.7%
#22874: fix(slack): preserve numeric threadId for message read
by HarryMWinters · 2026-02-21
82.7%
#22485: fix(slack): use threadId from delivery context as threadTs fallback...
by dorukardahan · 2026-02-21
81.1%
#12199: fix(message): add threadId parameter to fetch schema for Slack thre...
by dbg-vanie · 2026-02-09
81.1%
#6071: fix(cli): add --thread-id option to message read command
by lyra63237 · 2026-02-01
80.6%
#4749: fix: handle string thread IDs in queue drain for Slack
by nvonpentz · 2026-01-30
80.5%
#20406: fix(slack): respect replyToMode when computing statusThreadTs in DMs
by QuinnYates · 2026-02-18
79.6%