You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Slack DM roots the encoded thread_ts is empty (slack:Dxxx:). This is produced by both:
the DM message path — _handle_message_event (slack/adapter.py:2409), which is faithful to upstreamhandleMessageEvent (adapter-slack/src/index.ts:2158), and
When a handler subsequently fetches that thread (event.thread.refresh(), pagination, fetch_message, open_modal-driven fetches), the Slack fetch paths call conversations.replies(ts=thread_ts) with no empty-thread_ts guard:
With an empty DM thread_ts this sends ts='', which returns no replies / loses the original message context for DM action paths. (Raised by the Codex review on #137.)
Pre-existing + faithful to upstream (not a #137 regression)
This already affects every DM root (DM messages), independent of #137. It is also faithful to upstream: upstream's fetchMessages (index.ts:4178) calls conversations.replies(ts: threadTs) with no empty guard either. So a fix here is a divergence ahead of upstream and is codebase-wide (all DM roots), not specific to block-actions — which is why it's out of scope for #137.
Proposed fix
In the Slack fetch dispatch (fetch_messages, fetch_message), when thread_ts is empty (DM root), route to the channel-history path (fetch_channel_messages / _fetch_channel_messages_* → conversations.history) instead of conversations.replies. This covers DM messages and DM block-actions uniformly. Add a regression test for an empty-DM-thread_tsfetch_messages that asserts it does not call conversations.replies(ts="").
Also consider filing the same upstream (vercel/chat) so the empty-DM-thread_ts fetch handling — and the #137 block-action divergence — can be removed on a future sync.
Summary
For Slack DM roots the encoded
thread_tsis empty (slack:Dxxx:). This is produced by both:_handle_message_event(slack/adapter.py:2409), which is faithful to upstreamhandleMessageEvent(adapter-slack/src/index.ts:2158), and_handle_block_actions(fix(slack): don't thread block-action responses in DMs (supersedes #133) #137), which is a documented divergence from upstream (see the Known Non-Parity row indocs/UPSTREAM_SYNC.md).When a handler subsequently fetches that thread (
event.thread.refresh(), pagination,fetch_message,open_modal-driven fetches), the Slack fetch paths callconversations.replies(ts=thread_ts)with no empty-thread_tsguard:_fetch_messages_forward/_fetch_messages_backward(slack/adapter.py:4118/:4134)fetch_message(slack/adapter.py:4164)With an empty DM
thread_tsthis sendsts='', which returns no replies / loses the original message context for DM action paths. (Raised by the Codex review on #137.)Pre-existing + faithful to upstream (not a #137 regression)
This already affects every DM root (DM messages), independent of #137. It is also faithful to upstream: upstream's
fetchMessages(index.ts:4178) callsconversations.replies(ts: threadTs)with no empty guard either. So a fix here is a divergence ahead of upstream and is codebase-wide (all DM roots), not specific to block-actions — which is why it's out of scope for #137.Proposed fix
In the Slack fetch dispatch (
fetch_messages,fetch_message), whenthread_tsis empty (DM root), route to the channel-history path (fetch_channel_messages/_fetch_channel_messages_*→conversations.history) instead ofconversations.replies. This covers DM messages and DM block-actions uniformly. Add a regression test for an empty-DM-thread_tsfetch_messagesthat asserts it does not callconversations.replies(ts="").Also consider filing the same upstream (vercel/chat) so the empty-DM-
thread_tsfetch handling — and the #137 block-action divergence — can be removed on a future sync.Refs
docs/UPSTREAM_SYNC.md— "Slack DM block-action threading" Known Non-Parity row.