Skip to content

feat: add Slack history backfill for Addie's search_slack tool#684

Merged
bokelley merged 3 commits into
mainfrom
bokelley/addie-slack-access
Jan 9, 2026
Merged

feat: add Slack history backfill for Addie's search_slack tool#684
bokelley merged 3 commits into
mainfrom
bokelley/addie-slack-access

Conversation

@bokelley

@bokelley bokelley commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added Slack history backfill job to index historical messages for Addie's search_slack tool
  • Addresses issue where Addie couldn't summarize Slack discussions because only ~110 messages were indexed (from the past 5 days of real-time indexing)
  • Backfill fetches up to 90 days of history across all public channels

Changes

  • server/src/slack/client.ts: Added getChannelHistory, getFullChannelHistory, and getThreadReplies functions for fetching Slack message history
  • server/src/addie/jobs/slack-history-backfill.ts: New backfill job with support for:
    • Thread replies
    • Private channels (opt-in, disabled by default)
    • Channel exclusion list (admin, billing, etc.)
    • Rate limiting between API calls
    • Progress callbacks
    • Idempotent operation (duplicates handled gracefully)
  • server/src/routes/addie-admin.ts: Added admin API endpoints:
    • POST /api/admin/addie/backfill/slack - Trigger backfill with options
    • GET /api/admin/addie/backfill/slack/status - Check index statistics

Test plan

  • Build passes
  • All 187 tests pass
  • Manual test: Run backfill on staging environment
  • Verify Addie can answer questions about historical Slack discussions

🤖 Generated with Claude Code

bokelley and others added 3 commits January 9, 2026 11:52
Adds the ability to backfill historical Slack messages so Addie can
search community discussions beyond the 5-day window of real-time
indexing.

Features:
- Fetches messages from public channels (private opt-in)
- Includes thread replies with rate limiting
- Excludes sensitive channels (admin, billing) by default
- Idempotent via upsert (safe to run multiple times)

New API endpoints:
- POST /api/admin/addie/backfill/slack - trigger backfill
- GET /api/admin/addie/backfill/slack/status - check index stats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enables Addie to filter Slack search results by channel name, which is
needed for requests like "summarize Governance working group discussions".

Changes:
- Added channel parameter to search_slack tool schema
- Updated tool description with guidance on channel filtering
- Database query now supports optional channel filtering with partial match
- Increased default/max limits to support summary use cases (10/25)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a dedicated tool for getting recent activity from a Slack channel
without requiring keyword search. This is the right tool for requests like
"summarize the Governance working group discussions".

Changes:
- Added get_channel_activity tool with channel, days, and limit params
- Added getChannelActivity database method that fetches by recency
- Response includes message count, most active users, and formatted messages
- Provides guidance for synthesizing results into summaries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 0d82361 into main Jan 9, 2026
6 checks passed
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