Skip to content

fix: preserve hidden Slack links in agent prompts#729

Merged
akshaan merged 1 commit into
mainfrom
codex/slack-hidden-link-context
Jun 24, 2026
Merged

fix: preserve hidden Slack links in agent prompts#729
akshaan merged 1 commit into
mainfrom
codex/slack-hidden-link-context

Conversation

@akshaan

@akshaan akshaan commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve Slack links when serializing Slackbot messages into the session API payload.
  • Extract rich-text links from raw Slack blocks as a fallback, including hidden links behind visible text like continue.
  • Append a compact Links included in the Slack message section to the agent prompt so linked Slack threads are visible to the agent.
  • Add regression coverage for hidden Slack message links and duplicate-link avoidance.

Root Cause

Slack messages with manually hyperlinked words can arrive with plain adapter text such as continue while the URL lives in Slack rich-text blocks or adapter link metadata. Slackbot was forwarding only the plain text when it was non-empty, so the agent had no way to know a linked thread existed.

Validation

  • bun test test/session-api.test.ts
  • pnpm --filter slackbotv2 check:types

Note: the clean PR worktree does not have Node dependencies installed; validation was run in the main checkout against the same patch before creating the PR branch.

@akshaan akshaan force-pushed the codex/slack-hidden-link-context branch from e334ec1 to fefdfab Compare June 24, 2026 00:36
@akshaan akshaan marked this pull request as ready for review June 24, 2026 00:51
@akshaan akshaan merged commit 6310312 into main Jun 24, 2026
27 checks passed
@akshaan akshaan deleted the codex/slack-hidden-link-context branch June 24, 2026 00:52
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