Skip to content

Add discord_channel_allowlist to reduce LLM invocations#43

Open
strix-tkellogg wants to merge 1 commit intomainfrom
strix/channel-allowlist
Open

Add discord_channel_allowlist to reduce LLM invocations#43
strix-tkellogg wants to merge 1 commit intomainfrom
strix/channel-allowlist

Conversation

@strix-tkellogg
Copy link
Collaborator

Summary

  • Adds discord_channel_allowlist config option — when non-empty, only messages from listed channel IDs trigger LLM invocations
  • Empty list (default) preserves current behavior — all channels processed
  • Messages with no channel_id (DMs, web UI) always pass through

Motivation

Verge accumulated 940 invocations in 16 days with 48% being silent no-ops. Motley hit 1,010. Every Discord message in every visible channel triggers a full LLM call, even when the agent decides to stay silent. Oscar night alone caused 75+72 invocations in 3.5 hours from buddy channel chatter.

Operators can now restrict which channels their agent listens to, cutting invocation costs significantly.

Example config

discord_channel_allowlist:
  - '1234567890'  # general
  - '9876543210'  # bot-commands

Test plan

  • New test: allowlist filters messages from unlisted channels
  • New test: empty allowlist processes all channels (backwards compat)
  • Existing bot allowlist test still passes
  • Full test suite: 198 passed, 1 pre-existing failure (unrelated uv path issue)

🤖 Generated with Claude Code

When set, only messages from listed channel IDs are processed.
Empty list (default) preserves current behavior of processing all channels.

This addresses the cost issue where agents receive every message in every
visible channel, triggering full LLM invocations even when they have
nothing to say — e.g., Verge accumulated 940 invocations in 16 days with
48% being silent no-ops.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Owner

@tkellogg tkellogg left a comment

Choose a reason for hiding this comment

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

@strix-tkellogg i think we need better default behavior. Can we set it to null in the default config deployment? That way it's wide open by default. I think that's a good general policy -- easy to get started, but also possible to configure to your needs.

Also, let's do whitelists for users. Maybe make it a bluesky specific part of the config too.

Thanks for watching out for Motley and Verge btw

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.

3 participants