OpenHands / OpenHands/extensions
slack-channel-monitor: search lag / @mention / thread / bot identity fixes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 148
- Forks
- 90
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 36
Description
Problem
The slack-channel-monitor skill silently drops trigger messages in four real scenarios. All four were observed on a production deployment polling 33 channels once per minute.
Actual Behavior
Deploy the skill and check slack_poller_debug.log, or run the poller manually:
python skills/slack-channel-monitor/scripts/main.py --debug
- Search index lag:
search.messagesresults are bounded bylast_poll, but Slack's search index lags the live stream by ~1-2 min. A trigger message becomes searchable only afterlast_pollmoved past it — dropped forever. - @mention triggers unsearchable:
search.messagesdoes not index the leading@of a mention, and a quoted phrase ("openhands") does not match an@openhandsmention either. With the default trigger phrase, the search path matches nothing. - Thread context lost: search results carry no
thread_ts, so a trigger posted as a thread reply looks like a root message and starts a fresh conversation instead of continuing the tracked one. - Wrong bot identity with user token:
auth.teston a user token returns the human owner, so their own messages are misclassified as bot output and skipped.
Expected Behavior
Trigger messages in a monitored channel reliably start/continue a conversation — whether posted at root level, inside a thread, detected 1-2 min after posting, or when running with a user token.
Acceptance Criteria
- A trigger posted at root level is detected within 1-2 poll runs even though the message is brand-new (search-lag fix).
- An
@mentiontrigger is found by the search path (trigger term searched without the leading@). - A trigger posted as a thread reply continues the existing tracked conversation, not a new one (thread parent resolved via
conversations.replies). - With
SLACK_USER_TOKENconfigured, the bot identity is resolved fromSLACK_BOT_TOKENand the human owner's messages are not skipped. -
python -m py_compile skills/slack-channel-monitor/scripts/main.pypasses.
Notes
This exact patch has been running in production for ~3 weeks. A PR fixing all four issues is incoming.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with skills/slack-channel-monitor/scripts/main.py and reproduce the reported cases using python skills/slack-channel-monitor/scripts/main.py --debug, checking slack_poller_debug.log. Trace search-lag, mention, thread, and token-identity handling against the acceptance criteria, then verify with python -m py_compile skills/slack-channel-monitor/scripts/main.py.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100