Component
API or orchestration
Describe the feature
Allow task creation (API, CLI, and Slack-origin flows) to accept a Slack thread permalink and hydrate the prompt from the full thread: messages, linked files, and bot replies in chronological order, within the existing hydration token budget.
Use case
Teams often spec work in Slack: discussion, clarifications, and links accumulate in a thread before anyone files a ticket. Submitting only a one-line description drops that context. Background agents work best when the collaboration artifact (the thread) is the spec.
Proposed solution
- Extend create-task schema with optional
slack_thread_url (or channel-specific metadata when origin is already Slack).
- Add hydration fetcher using the installed Slack app token (same credentials as notification dispatcher).
- Normalize thread to markdown sections; trim oldest non-essential messages first (mirror PR comment trimming).
- Screen fetched text through existing Guardrails / sanitization paths.
- CLI:
bgagent submit --slack-thread <url> ....
Other information
- Requires linked Slack workspace (existing setup guide).
- Complements shipped Slack @mention submission; this targets richer context for the same channel.
- Consider rate limits and
channel:history scopes in setup docs.
Acknowledgements
Acceptance criteria
Component
API or orchestration
Describe the feature
Allow task creation (API, CLI, and Slack-origin flows) to accept a Slack thread permalink and hydrate the prompt from the full thread: messages, linked files, and bot replies in chronological order, within the existing hydration token budget.
Use case
Teams often spec work in Slack: discussion, clarifications, and links accumulate in a thread before anyone files a ticket. Submitting only a one-line description drops that context. Background agents work best when the collaboration artifact (the thread) is the spec.
Proposed solution
slack_thread_url(or channel-specific metadata when origin is already Slack).bgagent submit --slack-thread <url> ....Other information
channel:historyscopes in setup docs.Acknowledgements
Acceptance criteria
cli/src/types.ts.slack.com/ workspace URLs from configured workspace; reject arbitrary URLs.cdk/test/handlers/shared/context-hydration.test.ts.