-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Problem
Bot messages in Slack with empty text property but content in attachments don't trigger agent sessions, even when allowBots: true is set in channel config.
Example Message
{
"subtype": "bot_message",
"text": "",
"attachments": [
{
"text": "Readiness probe failed: Get \"http://10.42.13.132:8000/status\": context deadline exceeded",
"title": "[K8S] Unhealthy: Pod/apprise-78447f9d-7ndvj"
}
],
"bot_id": "B0AGV8EQYA3",
"ts": "1772111956.216009"
}Config
{
"channels": {
"slack": {
"channels": {
"C0AH68CDRQD": {
"requireMention": false,
"allowBots": true
}
}
}
}
}Expected Behavior
When allowBots: true, bot messages should trigger sessions regardless of whether content is in text or attachments.
Actual Behavior
Bot messages with text: "" are silently ignored. No session is created, no logs appear in gateway.log.
Use Case
Monitoring webhooks (Prometheus Alertmanager, Gatus, etc.) often send Slack messages with empty text and all content in attachments. The agent should be able to react to these alerts.
Workaround
Currently relying on humans replying in thread, which then includes the parent message context. This is not ideal for autonomous monitoring.
Suggested Fix
Extract text from attachments[].text or attachments[].fallback if message text is empty, or trigger sessions for any bot message when allowBots: true regardless of text content.