Repository navigation
fix: respond to file shares and attachment-only messages in code channels - #110
Merged
Merged
Conversation
…nels Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
cchensh
approved these changes
Dec 1, 2026
cchensh
left a comment
Contributor
There was a problem hiding this comment.
Nits (test-only, same in every sample dir):
- The main case isn't tested: no test sends a
file_sharewith empty text through the message listener, which is the bug in the title. Something likesend('', { subtype: 'file_share', files: [{ id: 'F123', name: 'trace.png' }] })expecting'<@U123>: (attachment: trace.png)'. - The narrowed subtype check has no negative case. One test each for
message_changedand for afile_sharewithbot_id, both expecting no turn, would pin that only file shares get through. - Optional: a file share whose text mentions the bot should still be skipped by the message listener (app_mention runs it), and a DM with a file should be answered.
Co-authored-by: Cheng Chen <35309699+cchensh@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Member
Author
|
🧪 Thanks for the review @cchensh! Added the empty text |
Member
Author
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.
Summary
This pull request runs a turn for a file shared into a code channel, with or without text, instead of ignoring it unless the agent is mentioned.
messagewith thefile_sharesubtype, which themessagelistener skipped along with edits and joins. Other subtypes and bot posts are still ignored.text, which the listener also skipped. The turn now names the shared files, like(attachment: trace.png), after any text. A mention with a file reads the same way.files:readscope.claude-agent-sdk,openai-agents-sdkandpydantic-ai.Many thanks to @thatsamguy for finding this and drafting the fix in thatsamguy#1 🙏
Testing
slack runand mention the agent with a coding task so it opens a code channel.🤖 Generated with Claude Code