calm-artist-7206
09/11/2026, 4:03 AMfresh-machine-37269
09/11/2026, 4:03 AMfresh-machine-37269
09/11/2026, 4:05 AMapp_mention), and one in the automation script (it currently ignores everything except app_mention).
1. Bridge — forward thread replies too (slack_socket_bridge.py) Replies to the bot's own comments arrive as plain message events (no @mention), so they never get forwarded. Add message to the forwarded types, but only for thread replies so the bot doesn't answer every channel message:
FORWARD_EVENT_TYPES = {"app_mention", "message"}
In on_request, right after the bot-message filter:
if event.get("bot_id") or event.get("subtype") == "bot_message":
return
# A reply to the bot's own comment is a plain `message` event (no
# @mention). Only forward thread replies; ignore top-level messages.
if etype == "message" and not event.get("thread_ts"):
return
2. Automation — accept thread replies (main.py) Replace the top guard:
if ev.get("type") != "app_mention":
log(f"ignoring non-app_mention event: {ev.get('type')!r}")
return None
with:
ev_type = ev.get("type", "")
is_app_mention = ev_type == "app_mention"
is_thread_reply_msg = ev_type == "message" and bool(ev.get("thread_ts"))
if not (is_app_mention or is_thread_reply_msg):
log(f"ignoring non-relevant event: {ev_type!r}")
return None
Then, after the Slack identity check (so `token`/`channel`/`thread_root` are available), guard that the bot actually posted in that thread — otherwise the bot would answer any thread reply in channels it can see:
if is_thread_reply_msg:
history = thread_history(token, channel, thread_root)
if not any(m.get("user") == EXPECTED_BOT_USER_ID or m.get("bot_id")
for m in history):
log("ignoring reply in a thread the bot hasn't posted in")
return None
The rest already works because for a message event request_after_trigger(text) returns the full text as-is (no trigger phrase to strip), and is_thread_reply already drives the thread-history context block. Optionally, make the prompt's "activated by the trigger phrase" line conditional so plain replies don't claim a mention triggered them.
Note: with this change each reply in the thread triggers a new run, so keep the existing `watch_until`/reuse logic in place to keep follow-ups in the same conversation and avoid duplicate summaries.calm-artist-7206
09/11/2026, 4:45 AMfresh-machine-37269
09/11/2026, 4:45 AMfresh-machine-37269
09/11/2026, 4:55 AMmessage events in streams/slack.py but only when they are a threaded reply to the bot's own message (thread_ts set and parent_user_id == bot_user_id), keeping bare channel messages and replies to other users ignored.
After waiting a minute, I checked the issue — it's still just enhancement and has not been marked ready-for-dev.calm-artist-7206
09/11/2026, 4:58 AMfresh-machine-37269
09/11/2026, 5:00 AM### Desired Behavior section and a properly-titled ### Acceptance Criteria section. I updated the issue body to add both, and after the automation re-checked it, issue #442 is now labeled ready-for-dev (alongside enhancement).
github.com/OpenHands/automation/issues/442