Repository navigation
fix(slack): clear stuck assistant status on /stop and resume typing after clarify - #64621
Merged
Merged
Conversation
…tadata Salvaged from #32340 by @LeonSGP43, adapted to the workspace-scoped status tracking that landed in #63709: - /stop with no running agent now best-effort clears the platform status indicator, so a phantom 'is thinking...' left by a gateway restart or a turn that died without a final send can always be dismissed (#32295). - SlackAdapter.stop_typing clears an untracked thread when the caller names it explicitly in metadata — clearing an unset status is a harmless no-op on Slack's side. The fallback is skipped when multiple Slack Connect workspaces track the same channel+thread and no team_id is given, preserving #63709's cross-workspace safety guarantee.
This was referenced Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slack's persistent assistant status ("is thinking...") can no longer get stuck with no way to dismiss it, and the typing indicator resumes after a user answers a clarify prompt. Salvages the two halves of #32340 (@LeonSGP43) and #62248 (@KCAYAAI) that survived the #63709 Agent View merge, adapted to the new workspace-scoped status tracking. Closes #32295.
Root cause
Two lifecycle gaps remained after #63709:
/stopwith no running agent returned "no active task" without touching the platform status indicator — the exact stuck-status scenario in Slack: "is thinking..." status indicator gets stuck when agent ends without sending a reply #32295 (status set by a turn that died without a final send, or by a previous gateway process). Compounding it,stop_typingonly cleared statuses present in the in-memory tracking map, so a status surviving a gateway restart was permanently unclearable./approvealready resumed; clarify was the asymmetric path.)Changes
gateway/slash_commands.py:/stop's no-active-agent branch now best-effort clears the platform status indicator via_stop_typing_with_metadata, with thread/workspace routing metadata.plugins/platforms/slack/adapter.py:stop_typingwith explicit thread metadata clears the status even when the tracking map has no entry (restart/eviction). The fallback is skipped when multiple Slack Connect workspaces track the same channel+thread and no team_id is given — fix(slack): complete Agent View workspace routing #63709's cross-workspace safety guarantee is preserved.gateway/run.py: clarify text-response interception callsresume_typing_for_chatso the resumed agent's indicator comes back immediately (cherry-picked from fix(slack): harden Assistant status lifecycle #62248, @KCAYAAI's authorship preserved).Validation
/stopwith stuck status, no agentstop_typingafter gateway restartTargeted suites green:
test_stop_thread_sibling.py,test_slack.py,test_clarify_active_session_bypass.py— 252 tests, 0 failed. E2E: real adapter + real_handle_stop_commandexercised against all four scenarios with an isolated HERMES_HOME.Contributor commits cherry-picked with authorship preserved; rebase-merge required.
Infographic