fix(slack): Handle stale history cursors#218
Merged
Conversation
Enable Slack's documented channel auto-linking behavior on outbound posts so bare channel references render as links without adding extra channel lookup API calls. Treat stale history cursors as recoverable tool errors instead of hard turn failures. This preserves the Slack API error context while guiding a retry from the newest page. Co-Authored-By: Codex GPT-5 <noreply@example.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Remove the shared outbound link_names change and the explicit mrkdwn verbatim flags from reply blocks. The Slack docs confirm these parsing knobs broaden automatic mention handling, and forcing them at the boundary is too broad for normal assistant replies. This restores the prior request contract while keeping the stale cursor handling fix in place, so the PR addresses the review blockers without adding extra Slack API traffic or accidental notifications. Co-Authored-By: Codex GPT-5 <noreply@example.com>
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.
Handle stale Slack history cursors
Slack conversations.history can return invalid_cursor for expired cursors from earlier tool results. That currently fails the whole tool call and bubbles a raw Slack API failure into the turn. This change maps invalid_cursor into a recoverable tool result that tells the caller to retry from the newest page instead.
I initially explored Slack-side auto-linking for bare channel references in the same PR, but Slack's documented auto-parsing knobs broaden mention handling. That change was removed so this PR stays scoped to the verified cursor failure and does not add extra Slack API traffic.
Refs JUNIOR-1R