Repository navigation
feat: attach Slack messages and threads as chat context - #134
Merged
Merged
Conversation
Pasting a Slack message link, picking one from the paperclip menu or the command palette, or choosing one in the composer's `#` menu now attaches the message's thread as a chip. It works the same way as Linear issues. The server reads the thread with the user's own Slack token and saves it as capped markdown when it is attached. That markdown keeps the first message and the linked one, fills the rest newest first, and resolves mentions to names. The snapshot is inlined into the prompt for every provider. Right-clicking a result in the picker attaches the message on its own. Settings > Integrations > Slack connects the account with PKCE OAuth. The redirect goes to a fixed localhost loopback port, and remote browsers can paste the redirect URL back. There is no built-in Slack app. Slack lets a distributed app without Marketplace approval read only 15 thread messages a minute, so each workspace makes its own app from a manifest the setting copies and enters its client ID. Mobile renders the chips and has a picker sheet. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.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.
There was no way to give an agent a Slack discussion without copying and pasting it. A Slack message can now be attached the same way a Linear issue or pull request is:
#channel · Authorchip once the thread loads. A reply, or a message with replies, brings its whole thread, with the linked message marked. Channel links stay as links. The first time a link can't be read because Slack isn't connected, a notice explains why.in:#eng from:@priya). Right-click a result and choose Attach only this message to leave out the rest of its thread.#menu: a Slack tab beside Pull requests, Linear, GitHub issues and Repositories. It appears once Slack is connected and only searches while it's visible.How it works
apps/server/src/slack/)search.messages,conversations.replies/infoandusers.info.<@U…>mentions and channel links. Files are listed by name, not downloaded.slack-threadcontext record, and every provider gets it in the prompt like Linear and GitHub issues.SlackAuth.ts) works likeLinearAuth.http://localhost:47832/callback. Slack only treatslocalhostas a desktop redirect, not127.0.0.1.expires_inare kept as non-expiring; rotating tokens are refreshed.pkce_enabled. The user creates the app at api.slack.com/apps and pastes its client ID. The server keeps that client ID across disconnects, andT3CODE_SLACK_CLIENT_IDcan supply one.Docs: new
docs/user/slack.md, plus updates tocomposer.mdandfork-differences.md.Testing
thread_tstaken from permalinks, thread vs. single message, a reply link withoutthread_ts, not-found, revoked), markdown rendering, permalink parsing, the context record round-trip, and the prompt payload. All pass.server.test.tscase ("flushes more than one tool chunk before the synchronization marker") fails the same way without this change.🤖 Generated with Claude Code