Skip to content

feat: add thinking indicator via emoji reaction#1

Open
torrespro wants to merge 3 commits intohelmcode:mainfrom
torrespro:feat/thinking-indicator
Open

feat: add thinking indicator via emoji reaction#1
torrespro wants to merge 3 commits intohelmcode:mainfrom
torrespro:feat/thinking-indicator

Conversation

@torrespro
Copy link

Summary

  • Adds an hourglass reaction (⏳ :hourglass_flowing_sand:) to the user's message while Claude Code is processing
  • Removes the reaction once the response is posted (or on error)
  • Applies to both @mentions and thread replies

This 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

  • Added _add_reaction() / _remove_reaction() helpers with silent error handling
  • Added client parameter to handle_mention and handle_message (injected by slack-bolt)
  • Wrapped invoke_claude() calls with reaction add/remove in try/finally

Test plan

  • Mention the bot in a channel — hourglass appears on your message, disappears when response arrives
  • Reply in a thread — same behavior on the reply message
  • Send an empty mention — no reaction (early return before invoke_claude)
  • Verify reaction is removed even when Claude Code errors out

Notes

  • Requires reactions:write bot token scope (already implied by chat:write in most Slack app configs)
  • Non-blocking: if the reactions API fails, the bot continues normally

🤖 Generated with Claude Code

Andres Torres and others added 3 commits February 25, 2026 14:06
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant