Skip to content

fix(discord): skip auto-threading reply messages - #9624

Closed
OwenYWT wants to merge 1 commit into
NousResearch:mainfrom
OwenYWT:fix/discord-reply-auto-thread
Closed

fix(discord): skip auto-threading reply messages#9624
OwenYWT wants to merge 1 commit into
NousResearch:mainfrom
OwenYWT:fix/discord-reply-auto-thread

Conversation

@OwenYWT

@OwenYWT OwenYWT commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • skip Discord auto-thread creation for MessageType.reply messages
  • keep quote-replies in their original free-response channel so they still dispatch to the agent
  • read require_mention and free_response_channels from config.extra before falling back to env vars
  • add regression coverage for reply messages and config-backed free-response channels

Root cause

Discord reply messages can be accepted by the message filter, but _handle_message still tried to auto-create a thread for them. Reply-based conversations should stay in the original channel, and thread creation can fail for reply messages.

Test plan

  • python -m pytest -o addopts='' tests/gateway/test_discord_free_response.py tests/gateway/test_discord_channel_controls.py -q
  • python -m py_compile gateway/platforms/discord.py tests/gateway/test_discord_free_response.py
  • python -m pytest -o addopts='' tests/gateway/test_discord_system_messages.py tests/gateway/test_discord_slash_commands.py::test_auto_thread_skips_threads_and_dms -q
  • git diff --check

Related: #9399

@RuckVibeCodes RuckVibeCodes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[gus-first-pass] fix(discord): skip auto-threading reply messages - Clear implementation, no issues found.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #11629#11629

Your commit (95b43c17) was cherry-picked with authorship preserved — both the is_reply_message skip and the _discord_require_mention / _discord_free_response_channels helpers with config.extra fallback are in.

Thanks for the clean scope (no unrelated bundled changes), the config.extra robustness improvement (consistent with channel_skill_bindings), and the regression coverage (test_discord_reply_message_skips_auto_thread + test_discord_free_response_channel_can_come_from_config_extra). Closes #9399 along with @Hypn0sis's free-response-skip from PR #9650 — your reply-skip addressed the other half of that bug.

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