hermes - 💡(How to fix) Fix Slack: "is thinking..." status indicator gets stuck when agent ends without sending a reply

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Slack's is thinking... status indicator (set via assistant.threads.setStatus) can get stuck on a thread when no agent is actually running. The bot appears to be "thinking" indefinitely until the next reply lands in that thread.

screenshot showing stuck indicator

Error Message

  1. Interrupt / kill / crash the agent before it sends its final reply (gateway restart mid-turn, /stop while pending, exception in the agent loop after send_typing but before the final send, etc.). If the agent never reaches a successful send() for that thread (interrupt, crash, gateway restart, exception in tool call → no final reply), the status stays set server-side on Slack. The Slack API persists assistant statuses on the thread until explicitly cleared or until the bot posts in the thread, so a gateway restart does not fix it — only a subsequent successful reply does.
  2. Slack adapter teardown / agent-exit cleanup: also clear status in the gateway's "agent finished without sending" code path (the same place _running_agents is cleared on exception / interrupt). The Slack adapter already tracks _active_status_threads — pop and clear it whenever the agent's run ends without a send(), not only on successful reply.

Root Cause

gateway/platforms/slack.py:

  • send_typing() (line ~902) calls assistant.threads.setStatus(status="is thinking...") and records chat_id → thread_ts in self._active_status_threads.
  • stop_typing() (line ~931) clears the status, but is only invoked from:
    • the send() success path (line ~810), and
    • the send() finalize branch (line ~890).

If the agent never reaches a successful send() for that thread (interrupt, crash, gateway restart, exception in tool call → no final reply), the status stays set server-side on Slack. The Slack API persists assistant statuses on the thread until explicitly cleared or until the bot posts in the thread, so a gateway restart does not fix it — only a subsequent successful reply does.

Additionally, _handle_stop_command (gateway/run.py:9516) does not call adapter.stop_typing() when _running_agents has no entry for the session — so /stop cannot rescue a stuck indicator either.

Fix Action

Workaround

Send any message to the bot in that thread — the next successful send() clears the status. Restarting the gateway does NOT clear it (status is server-side on Slack).


Reported via dogfooding (Hermes ↔ Slack).

RAW_BUFFERClick to expand / collapse

Summary

Slack's is thinking... status indicator (set via assistant.threads.setStatus) can get stuck on a thread when no agent is actually running. The bot appears to be "thinking" indefinitely until the next reply lands in that thread.

screenshot showing stuck indicator

Reproduction

  1. Send a message that triggers the agent in a Slack thread where the adapter calls send_typing() (DM or @mention).
  2. Interrupt / kill / crash the agent before it sends its final reply (gateway restart mid-turn, /stop while pending, exception in the agent loop after send_typing but before the final send, etc.).
  3. The Slack thread now shows Hermes is thinking... forever — even though _running_agents is empty.

Sending /stop returns gateway.stop.no_active but does not clear the status indicator, because _handle_stop_command only clears typing on the "agent was running" branch.

Root cause

gateway/platforms/slack.py:

  • send_typing() (line ~902) calls assistant.threads.setStatus(status="is thinking...") and records chat_id → thread_ts in self._active_status_threads.
  • stop_typing() (line ~931) clears the status, but is only invoked from:
    • the send() success path (line ~810), and
    • the send() finalize branch (line ~890).

If the agent never reaches a successful send() for that thread (interrupt, crash, gateway restart, exception in tool call → no final reply), the status stays set server-side on Slack. The Slack API persists assistant statuses on the thread until explicitly cleared or until the bot posts in the thread, so a gateway restart does not fix it — only a subsequent successful reply does.

Additionally, _handle_stop_command (gateway/run.py:9516) does not call adapter.stop_typing() when _running_agents has no entry for the session — so /stop cannot rescue a stuck indicator either.

Proposed fix

Belt-and-suspenders, in two places:

  1. _handle_stop_command: always call adapter.stop_typing(chat_id) before returning, regardless of whether an agent was active. Cheap no-op for platforms without server-persisted status.
  2. Slack adapter teardown / agent-exit cleanup: also clear status in the gateway's "agent finished without sending" code path (the same place _running_agents is cleared on exception / interrupt). The Slack adapter already tracks _active_status_threads — pop and clear it whenever the agent's run ends without a send(), not only on successful reply.

Optionally: a watchdog that auto-clears entries in _active_status_threads older than N seconds with no corresponding running agent.

Affected versions

Reproduces on main (May 2026). Affects Slack DMs and @mention threads where assistant:write scope is granted.

Workaround

Send any message to the bot in that thread — the next successful send() clears the status. Restarting the gateway does NOT clear it (status is server-side on Slack).


Reported via dogfooding (Hermes ↔ Slack).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING