Skip to content

fix(slack): keep the thread status indicator on assistant.threads.setStatus - #110391

Open
isair wants to merge 1 commit into
NousResearch:mainfrom
isair:fix/slack-status-legacy-api
Open

isair wants to merge 1 commit into
NousResearch:mainfrom
isair:fix/slack-status-legacy-api

Conversation

@isair

@isair isair commented Sep 13, 2026

Copy link
Copy Markdown

Fixes #110374.

Problem

a5522f6 routed status through agents.sessions.setStatus whenever the installed slack-sdk ships the typed method (>=3.44.0). That API accepts only the closed enum active|processing|suspended|closed, while every Hermes call site still sends the legacy free-text protocol:

  • work start: free-text phrases ("is thinking…", the elapsed-time heartbeat)
  • per-tool live_status: full|verb updates and typing_status_text
  • clear on turn end: an empty string

All are rejected with invalid_arguments, and since status failures are debug-logged by design, the indicator disappeared silently on every turn with no output at INFO/WARNING.

Fix

Status always uses the legacy assistant.threads.setStatus, which takes free text and auto-clears on reply, until its February 2027 deprecation. Titles keep using agents.sessions.rename — that takes free text and was never affected.

Why not migrate to the enum

Two things make the enum a product decision rather than a bugfix, both flagged in the issue:

  1. processing does not auto-clear when the app replies. A turn ending without an explicit active would leave the spinner up for up to an hour, re-opening the stuck-indicator class fixed by fix(slack): clear stuck assistant status on /stop and resume typing after clarify #64621 / Slack Assistant thread can stay stuck in 'is thinking...' after response is sent #24117.
  2. The new API has no equivalent for custom status text, so adopting it drops live_status and typing_status_text in favour of a generic loading UX.

Worth deciding explicitly before the 2027 deadline; this PR just stops the silent breakage.

Tests

TestAgentSessionsApiRouting now pins the routing in both directions: with _AGENT_SESSIONS_SUPPORTED = True, the set and the clear must both hit the legacy method and must not call agents_sessions_setStatus. The title test is unchanged. Both new tests fail without the adapter change. Full tests/gateway/test_slack.py: 242 passed, 1 skipped.

🤖 Generated with Claude Code

…Status

a5522f6 routed status through agents.sessions.setStatus whenever the
installed slack-sdk ships the typed method (>=3.44.0). That API accepts only
the closed enum active|processing|suspended|closed, while every Hermes call
site still sends the legacy free-text protocol: work-start phrases, per-tool
live_status updates, typing_status_text, and an empty string to clear. All of
them are rejected with invalid_arguments, and because status failures are
debug-logged by design the indicator vanished silently on every turn (NousResearch#110374).

Status now always uses the legacy method, which takes free text and auto-clears
on reply until its February 2027 deprecation. Titles keep using
agents.sessions.rename, which takes free text and was never affected.

Not migrated to the enum on purpose: processing does not auto-clear when the
app replies, so a turn ending without an explicit active would leave the
spinner up for up to an hour, re-opening the stuck-indicator class fixed by
 NousResearch#64621 / NousResearch#24117; and the new API has no equivalent for custom status text, so
adopting it drops live_status and typing_status_text. That trade is a product
decision, not a regression fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins platform/slack Slack app adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Sep 13, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Competing with #110389 for the same fix (#110374). This PR routes status back to the legacy assistant.threads.setStatus (free text, auto-clear); #110389 keeps the Agent Sessions route and maps text→processing/clear→active. Maintainer should pick one; the tradeoffs (no auto-clear, loss of custom status text on the enum API) are spelled out in this PR body.

@dutchman80

Copy link
Copy Markdown

Live reproduction/confirmation from a Slack Socket Mode deployment on slack-sdk with Agent Sessions support: agents.sessions.setStatus(channel_id=<DM>, thread_ts=<root>, status="is thinking...") returned invalid_arguments; the empty-string clear did too. The same thread accepted assistant.threads.setStatus for both the free-text status and empty-string clear (ok: true). After routing text status back to the legacy method and restarting the gateway, the user confirmed the “working” indicator returned. The focused Slack adapter test file passed (211 tests) with assertions that status/clear use the legacy method while title still uses Agent Sessions rename. Streaming was disabled separately to contain duplicate replies; that is a distinct issue and not part of this status fix.

@sentic-binary

Copy link
Copy Markdown

@alt-glitch can we finały merge a bugfix for this? My hermes via Slack gives 0 feedback since one month already...

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/slack Slack app adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack: status indicator silently broken with slack-sdk >= 3.44 (agents.sessions.setStatus rejects free-text and empty status)

4 participants