fix(slack): expose thread_ts in sender_json so agents reply in thread#444
Merged
thepagent merged 3 commits intoopenabdev:mainfrom Apr 18, 2026
Merged
Conversation
thepagent
approved these changes
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an agent calls
chat.postMessagedirectly via the Slack API, it needs to passthread_tsto keep replies in the correct thread. Previously,SenderContextserialized the thread identifier as\"thread_id\"— a generic platform-agnostic name that agents could not reliably map to Slack'sthread_tsparameter. As a result, messages were posted to channel root instead of the thread.This is a Slack-only issue. Discord threads are separate channels, so
channel_idalready identifies the thread — no separatethread_tsconcept exists.Discussion: https://discord.com/channels/1491295327620169908/1494739741600387204/1494944277694775457
Solution
Change
AdapterRouter::handle_messageto accept a pre-serializedsender_json: &strso each platform adapter controls its own serialization format:slack.rs: renames\"thread_id\"→\"thread_ts\"before passing tohandle_messagediscord.rs: serializes as-is (no change in behavior)adapter.rs: removes internalserde_json::to_string(sender)callAgent now receives:
```json
{
"channel": "slack",
"channel_id": "C99999",
"thread_ts": "1234567890.123456"
}
```
No shared layer is polluted with Slack-specific logic.
Files Changed
src/adapter.rs— signature change onlysrc/slack.rs— custom serialization withthread_tskeysrc/discord.rs— standard serialization, no behavior changeTest Plan
cargo clippy -- -D warningspassesthread_ts→ message stays in thread🤖 Generated with Claude Code