Repository navigation
Conversation
Collaborator
|
Partially merged via #64621 — your clarify-resume commit was cherry-picked onto current main with your authorship preserved in git log ( The status-tracking half (per-thread set, send-error clearing, edit_message metadata) was superseded by #63709, which landed the same fixes with workspace-scoped (team, channel, thread) keys for Slack Connect setups. Thanks @KCAYAAI! |
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
Harden the Slack Assistant status lifecycle in both directions:
clarifyreply resolves.Together these changes prevent both kinds of misleading Slack UI state: an active run that looks silent after clarification, and a completed run that remains stuck on
is thinking.../Evaluating....Problems
Clarification replies do not resume status
The clarify callback deliberately pauses typing while it waits so Slack's Assistant API does not disable the compose box. When the user answers, the gateway intercepts the reply and resumes the existing agent run, but the interception path returned an empty acknowledgment without re-enabling typing. The run continued silently until the independent long-running heartbeat fired.
Completed turns can leave stale status
Slack Assistant status is server-side state keyed by channel and thread. The adapter previously tracked only one
thread_tsperchat_id, so overlapping threads could overwrite each other. Cleanup also removed tracking before Slack confirmedassistant.threads.setStatus(status=""); a transient failure therefore left a visible status with no local record available for retry. Failed final sends could leave the same stale state.Fix
API/scope failures cannot create an unbounded local leak.
reply_to/metadata once and attempt exact-thread cleanup when afinal Slack send fails.
Reproduction
Clarify resume
clarifytool in Slack.is thinking....Stale status after completion
is thinking.../Evaluating...even though the turn has finished.Verification
pytest -q -o 'addopts=' tests/gateway/test_clarify_active_session_bypass.py tests/gateway/test_typing_indicator_toggle.py tests/gateway/test_keep_typing_timeout.py tests/gateway/test_slack.pyruff check gateway/run.py plugins/platforms/slack/adapter.py tests/gateway/test_clarify_active_session_bypass.py tests/gateway/test_slack.pygit diff --checkRegression coverage includes:
reply_to-only callers.Live verification
Related: #24117, #32295, #8387