feat: add thinking indicator via emoji reaction#1
Open
torrespro wants to merge 3 commits intohelmcode:mainfrom
Open
feat: add thinking indicator via emoji reaction#1torrespro wants to merge 3 commits intohelmcode:mainfrom
torrespro wants to merge 3 commits intohelmcode:mainfrom
Conversation
Add an hourglass reaction (⏳) to the user's message while Claude Code is processing, then remove it when the response is posted. This gives users immediate visual feedback that the bot received their message. - Applies to both @mentions and thread replies - Uses `client` parameter from slack-bolt for reactions API - Errors in add/remove are silently logged (non-blocking) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Default remains 300s but can now be overridden by setting BENDER_TIMEOUT in the environment. The setting is passed through to all invoke_claude() calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The thinking indicator feature requires the reactions:write scope to add/remove the hourglass emoji. Without it, the bot works fine but the thinking indicator silently fails. Co-Authored-By: Claude Opus 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
:hourglass_flowing_sand:) to the user's message while Claude Code is processing@mentionsand thread repliesThis gives users immediate visual feedback that the bot received their message and is working on a response, which is important since Claude Code invocations can take 30+ seconds.
Changes
_add_reaction()/_remove_reaction()helpers with silent error handlingclientparameter tohandle_mentionandhandle_message(injected by slack-bolt)invoke_claude()calls with reaction add/remove intry/finallyTest plan
invoke_claude)Notes
reactions:writebot token scope (already implied bychat:writein most Slack app configs)🤖 Generated with Claude Code