NousResearch/hermes-agent

Discord slash command routing fix in threads

Cluster 2011 · gateway. Data as of

Nothing open on GitHub. Fix merged in #2460 on 22 Mar 2026. Check it covers your case.

The short answer

0open issues
0open PRs
3items grouped
Known?
Yes. 3 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #2460. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #2460. That is separate from the fix event.
Still open
Nothing open on GitHub.

A bug was identified where Discord native slash commands did not work correctly inside threads. Related fixes address slash event routing in that context, alongside a broader multi-platform patch that includes this among other issues.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #2460 fix(discord): properly route slash event handling in threads

    merged to main

    files: gateway/platforms/discord.py, tests/gateway/test_discord_slash_commands.py

    Show the diff
    • gateway/platforms/discord.py
      @@ -1500,7 +1500,17 @@ async def slash_thread(
           def _build_slash_event(self, interaction: discord.Interaction, text: str) -> MessageEvent:
               """Build a MessageEvent from a Discord slash command interaction."""
               is_dm = isinstance(interaction.channel, discord.DMChannel)
      -        chat_type = "dm" if is_dm else "group"
      +        is_thread = isinstance(interaction.channel, discord.Thread)
      +        thread_id = None
      +
      +        if is_dm:
      +            chat_type = "dm"
      +        elif is_thread:
      +            chat_type = "thread"
      +            thread_id = str(interaction.channel_id)
      +        else:
      +            chat_type = "group"
      +
               chat_name = ""
               if not is_dm and hasattr(interaction.channel, "name"):
                   chat_name = interaction.channel.name
      @@ -1516,6 +1526,7 @@ def _build_slash_event(self, interaction: discord.Interaction, text: str) -> Mes
                   chat_type=chat_type,
                   user_id=str(interaction.user.id),
                   user_name=interaction.user.display_name,
      +            thread_id=thread_id,
                   chat_topic=chat_topic,
               )
       
    • tests/gateway/test_discord_slash_commands.py
      @@ -241,6 +241,42 @@ async def capture_handle(event):
           assert "TestGuild" in event.source.chat_name
       
       
      +# ------------------------------------------------------------------
      +# _build_slash_event — preserve thread context for native slash commands
      +# ------------------------------------------------------------------
      +
      +
      +def test_build_slash_event_preserves_thread_context(adapter):
      +    interaction = SimpleNamespace(
      +        channel=_FakeThreadChannel(channel_id=555, name="Planning"),
      +        channel_id=555,
      +        user=SimpleNamespace(display_name="Jezza", id=42),
      +    )
      +
      +    event = adapter._build_slash_event(interaction, "/status")
      +
      +    assert event.text == "/status"
      +    assert event.source.chat_id == "555"
      +    assert event.source.chat_type == "thread"
      +    assert event.source.thread_id == "555"
      +    assert "TestGuild" in event.source.chat_name
      +
      +
      +def test_build_slash_event_uses_group_context_for_channels(adapter):
      +    interaction = SimpleNamespace(
      +        channel=_FakeTextChannel(channel_id=123, name="general"),
      +        channel_id=123,
      +        user=SimpleNamespace(display_name="Jezza", id=42),
      +    )
      +
      +    event = adapter._build_slash_event(interaction, "/status")
      +
      +    assert event.source.chat_id == "123"
      +    assert event.source.chat_type == "group"
      +    assert event.source.thread_id is None
      +    assert "TestGuild / #general" == event.source.chat_name
      +
      +
       # ------------------------------------------------------------------
       # Auto-thread: _auto_create_thread
       # ------------------------------------------------------------------

1 PR closed without merging

From the close comments: merged via another change 1

  • #2017 fix(discord): properly route slash event handling in threads · merged via another change → #2460
Closed issues · 1
  • Closed#2011[Bug]: Discord native slash commands broken inside threads
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.67: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
gateway
Merged PRs
#2460
Closed issues
1
Attempts
1 PR closed without merging
Fix link checked
22 Mar 2026. This confirmation is old and may be out of date (a revert or reopen would not have invalidated it here); re-verify.

For your agent

The same facts, typed.