Skip to content

[Bug] /goal slash command times out on Discord — handler not registered in discord.py #21589

Closed as not planned

Description

@Kredith

Summary

After upgrading to v0.13.0 (v2026.5.7), invoking the new /goal slash command on Discord fails with the Discord-native Application did not respond timeout (3-second interaction ack window). The CLI/router-side handling appears to exist, but the Discord platform never registers a handler for the slash command.

Environment

  • Hermes Agent: v0.13.0 (v2026.5.7), git HEAD 498bfc7bc
  • Platform: Discord (single-user bot)
  • Host: NVIDIA DGX Spark / GB10, aarch64, Python 3.12
  • Backend LLM: local llama-server (gemma4-26b, OpenAI-compatible)

Reproduction

  1. Upgrade from v0.12.0 to v0.13.0 (no other config changes related to /goal)
  2. Restart hermes-gateway
  3. In Discord, type /goal (the autocomplete shows the command — Discord-side it is exposed)
  4. Submit the slash command

Expected: Hermes responds with goal status / sets a new goal as documented (gateway/run.py:5313, 5662, 8382).

Actual: Discord shows the native ephemeral message:

❗ 애플리케이션이 응답하지 않았어요 (Application did not respond)

No handler activation appears in journalctl --user -u hermes-gateway for the /goal invocation — no traceback, no log line referencing goal.

Code trace

The router/CLI side handles goal correctly:

  • gateway/run.py:5313 — mid-run /goal status/pause/clear handling
  • gateway/run.py:5662 — if canonical == "goal": return await self._handle_goal_command(event)
  • gateway/run.py:8382 — async def _handle_goal_command(self, event: "MessageEvent") -> str:
  • hermes_cli/goals.py — module exists

But on the Discord platform, gateway/platforms/discord.py:_register_slash_commands() (around line 2872) only registers 12 explicit slash handlers:

slash_new, slash_reset, slash_model, slash_reasoning, slash_personality,
slash_retry, slash_undo, slash_status, slash_sethome, slash_stop,
slash_steer, slash_compress

There is no slash_goal handler, so when Discord delivers the interaction, nothing replies within the 3-second ack window and Discord shows the native timeout.

$ grep -nE "async def slash_" gateway/platforms/discord.py
# 12 handlers above; no `slash_goal`

Workaround (untested locally)

Sending /goal <text> as a regular chat message (not via Discord's slash UI) likely routes through gateway/run.py:5662 (canonical == "goal") and may work. We have not confirmed this on our deployment.

Suggested fix

Add a slash_goal handler in gateway/platforms/discord.py:_register_slash_commands() that mirrors the chat-side dispatch (defer + call _handle_goal_command + send followup). Pattern looks identical to existing slash_steer (which takes a prompt: str arg) for new-goal text, with optional subcommand (status/pause/resume/clear/stop/done) for mid-run.

Impact

  • Severity: low — chat-message workaround appears available
  • Affected: any Discord-deployed v0.13.0 user who tries the documented /goal slash flow
  • First-wave bug suspected — v0.13.0 released 2026-05-07, this is the first slash-command attempt on our deployment

Activity

  1. added
    type/bugSomething isn't working
    comp/gatewayGateway runner, session dispatch, delivery
    P2Medium — degraded but workaround exists
    on May 8, 2026
  2. teknium1 commented on Jun 11, 2026

    @teknium1
    Collaborator

    Automated hermes-sweeper review: this appears implemented on current main by the broader Discord slash auto-registration path.

    Evidence:

    • hermes_cli/commands.py:108 defines /goal in COMMAND_REGISTRY as a gateway-available command with optional args.
    • plugins/platforms/discord/adapter.py:3353 auto-registers gateway-available commands from COMMAND_REGISTRY into Discord's native command tree when they are not already explicitly registered.
    • plugins/platforms/discord/adapter.py:3364 builds auto handlers that dispatch /{name} {args} through _run_simple_slash, so /goal, /goal status, and /goal <text> reach the shared gateway command path.
    • plugins/platforms/discord/adapter.py:3190 defers the Discord interaction before dispatching to handle_message, which addresses the original Discord-native timeout symptom.
    • The broader fix was introduced by f74025db197a9f201bf585bda69f93a7475bb2cb (fix: auto-register all gateway commands as Discord slash commands).

    I also checked the linked PR #22105; it was a narrow fix for this issue, but current main now covers the same behavior through the registry-driven Discord slash registration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryplatform/discordDiscord bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions