#9671: feat(slack): add AI Assistant loading states support
channel: slack
stale
Cluster:
Slack Integration Enhancements
## Summary
Add support for Slack's AI Assistant features (loading states) when the 'Agents & AI Apps' feature is enabled in the Slack app settings.
This displays a loading indicator like "is thinking..." in the Slack UI while the bot processes messages, providing better UX than just an ack reaction.
## Changes
- Add new `src/slack/assistant.ts` with helpers for:
- `setAssistantStatus` - set loading message (e.g., 'is thinking...')
- `clearAssistantStatus` - clear loading status
- `setAssistantSuggestedPrompts` - set suggested prompts (future use)
- `setAssistantThreadTitle` - set thread titles (future use)
- Add `channels.slack.assistant` config:
- `enabled` - toggle AI Assistant features (default: false)
- `statusMessage` - custom loading message (default: 'is thinking...')
- Integrate with existing ack reaction flow:
- Set assistant status when ack reaction is added
- Clear assistant status after reply is delivered
## Usage
1. Enable 'Agents & AI Apps' in your Slack app settings
2. Add `assistant:write` scope (auto-added when feature is enabled)
3. Configure OpenClaw:
```yaml
channels:
slack:
assistant:
enabled: true
statusMessage: 'is thinking...'
```
## Notes
- Requires Slack app to have 'Agents & AI Apps' feature enabled
- Works alongside existing ack reactions (both can be enabled)
- Gracefully fails if API calls don't work (logged but not thrown)
- No new dependencies required (`@slack/web-api` already supports the API)
## Testing
- [x] Build passes
- [x] Manual testing with Slack workspace
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds a Slack “AI Assistant” integration layer (`src/slack/assistant.ts`) and wires it into the Slack message handler flow: when ack reactions are used, the bot sets an assistant loading status (configurable via `channels.slack.assistant.*`) and later attempts to clear it after replies are delivered. Config schema labels/help text and Slack config types are updated accordingly, and the new helper exports are re-exported from `src/slack/index.ts`.
<h3>Confidence Score: 3/5</h3>
- This PR is mergeable after fixing assistant status lifecycle edge cases.
- Core wiring is small and guarded by config, but there are two correctness issues that can leave Slack’s loading state stuck: clearing is gated on ack-reaction success even though status can be set without it, and clearing via empty string may not be accepted by Slack’s API.
- src/slack/monitor/message-handler/prepare.ts, src/slack/monitor/message-handler/dispatch.ts, src/slack/assistant.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#9954: feat(slack): add Agents & AI Apps (assistant) support
by natedenh · 2026-02-05
89.2%
#9985: feat(slack): add channel-aware context for AI Assistant threads
by natedenh · 2026-02-05
87.3%
#21147: feat(slack): support chat:write.customize for custom bot name/avatar
by bernardclaw · 2026-02-19
77.6%
#19816: feat(slack): add typingReaction config for DM typing indicator fall...
by dalefrieswthat · 2026-02-18
77.4%
#15768: feat(slack): Add queue position indicators for message queues
by haynzz · 2026-02-13
75.0%
#9520: fix: ignore slack already_reacted
by bolismauro · 2026-02-05
74.8%
#7404: feat(slack): add Socket Mode bot + auto-join + bridge scaffolding; ad…
by zprager · 2026-02-02
74.2%
#11491: feat(slack): allow agents to resolve channel IDs to names and list ...
by Lukavyi · 2026-02-07
73.3%
#23268: feat(slack): Add App Home tab support
by slurpyone · 2026-02-22
72.8%
#13486: fix: allow Slack HTTP mode without app token
by SepehrShapouri · 2026-02-10
72.2%