Skip to content

fix(slack): Handle stale history cursors#218

Merged
dcramer merged 2 commits intomainfrom
dcramer/fix/slack-link-and-cursor
Apr 18, 2026
Merged

fix(slack): Handle stale history cursors#218
dcramer merged 2 commits intomainfrom
dcramer/fix/slack-link-and-cursor

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented Apr 18, 2026

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

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Apr 18, 2026 7:36pm

Request Review

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>
@dcramer dcramer changed the title fix(slack): Handle channel links and stale cursors fix(slack): Handle stale history cursors Apr 18, 2026
@dcramer dcramer marked this pull request as ready for review April 18, 2026 20:23
@dcramer dcramer merged commit 4de5449 into main Apr 18, 2026
14 of 15 checks passed
@dcramer dcramer deleted the dcramer/fix/slack-link-and-cursor branch April 18, 2026 20:23
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant