feat: spawn thread via emoji reaction trigger - #86
Merged
Conversation
Add Phase 3 to the poll loop that watches for a configurable emoji reaction (default: "onit") on messages. When the authenticated user adds the trigger reaction, Claw starts a new thread with context and removes the reaction. Includes dedup via session lookup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Closes #85
Adds Phase 3 to the poll loop that watches for a configurable emoji reaction (default:
onit) on messages. When the authenticated user adds the trigger reaction to any message in a watched channel, Claw:• Starts a new thread on that message
• Sends Claude an opening message with context prefix
• Removes the reaction to keep the channel clean
Changes
•
claw/core/config.py— AddedCLAW_TRIGGER_REACTIONandCLAW_REACTION_CHANNELSconfig fields withreaction_channelsproperty•
claw/core/slack_client.py— Addedremove_reaction()function for Slackreactions.removeAPI•
claw/core/slack_poller.py— Added Phase 3 reaction trigger detection with_check_reaction_triggers()method; dedup viaget_session•
openspec/changes/reaction-trigger/spec.md— OpenSpec for the feature•
tests/test_slack_poller.py— 6 new tests inTestReactionTriggerclassTest plan
• All 308 tests pass (302 existing + 6 new)
• Tests cover: trigger creation, other-user ignore, dedup, disabled state, reaction removal, context prefix