Skip to content

[Bug]: Discord slash command sync fails: group 'skill' exceeds maximum size (8000) #11321

@BonsaiEX

Description

@BonsaiEX

Bug Description

Summary

hermes gateway fails to sync Discord slash commands because the skill command group exceeds Discord's maximum size limit.

Error:

Failed to upload commands to Discord (HTTP status 400, error code 50035)
In group 'skill' defined in module 'gateway.platforms.discord'
Command exceeds maximum size (8000)

Environment

  • Hermes Agent: latest version available as of today

  • Platform: Linux Mint

  • Discord gateway enabled

  • Profiles tested:

    • default
    • imperial-fresh

What I observed

Running:

hermes gateway

causes Discord slash command sync to fail with the error above.

I also checked the loaded skills and got:

  • 0 local
  • 0 hub-installed
  • 75 builtin

So this still reproduces even when there are no local custom skills.

Reproduction

  1. Start Hermes Discord gateway
  2. Let Discord slash command sync run
  3. Observe sync failure in command group skill

What I already tested

  • Removed all custom/local skills → still reproduces
  • Switched profiles (default and imperial-fresh) → still reproduces
  • Stopped another bot (OpenClaw) in the same Discord server → still reproduces

So this does not seem to be caused by:

  • local custom skills
  • profile-specific config
  • another bot sharing the same server

Likely cause

It looks like the built-in Discord /skill command group is too large with current built-in skills.

Debug Report

I ran hermes debug share, but the generated report/log links contained personal local path information, so I prefer not to share them publicly in this issue.

If needed, I can provide additional sanitized details manually.

I found that disabling the call to:

self._register_skill_group(tree)

inside gateway/platforms/discord.py allows the gateway to log in normally.

Temporary workaround

Comment out the self._register_skill_group(tree) call in _register_slash_commands().

After doing that, hermes gateway starts and logs in successfully.

Expected behavior

Discord slash commands should sync successfully, even if some skills must be omitted, truncated, paginated, or grouped differently.

Actual behavior

The whole skill slash command group fails to sync because it exceeds Discord's size limit.

Steps to Reproduce

  1. Start Hermes Discord gateway with hermes gateway
  2. Let Discord slash command sync run
  3. Observe sync failure:
    "In group 'skill' ... Command exceeds maximum size (8000)"

Expected Behavior

Discord slash commands should sync successfully, including skill-related commands, or gracefully omit/truncate skills without failing the whole sync.

Actual Behavior

Discord slash command sync fails during gateway startup.
The skill command group exceeds Discord's maximum size limit (8000), so the group does not sync.

Affected Component

Other, Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Discord

Debug Report

I ran `hermes debug share`, but the generated report/log links contained personal local path information, so I prefer not to share them publicly in this issue.

If needed, I can provide additional sanitized details manually.

Operating System

Linux Mint

Python Version

3.11.15

Hermes Version

v0.9.0 (2026.4.13)

Additional Logs / Traceback (optional)

Traceback (most recent call last):
  File "/home/user/.hermes/hermes-agent/gateway/platforms/discord.py", line 709, in _run_post_connect_initialization
    synced = await asyncio.wait_for(self._client.tree.sync(), timeout=30)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/home/user/.hermes/hermes-agent/venv/lib/python3.11/site-packages/discord/app_commands/tree.py", line 1121, in sync
    raise CommandSyncFailure(e, commands) from None
discord.app_commands.errors.CommandSyncFailure: Failed to upload commands to Discord (HTTP status 400, error code 50035)
In group 'skill' defined in module 'gateway.platforms.discord'
  Command exceeds maximum size (8000)

Root Cause Analysis (optional)

This appears to be caused by Discord slash command registration for the built-in skill group.

I confirmed:

  • removing all local/custom skills does not fix it
  • switching profiles does not fix it
  • stopping another bot in the same Discord server does not fix it

I also found that disabling the call to self._register_skill_group(tree) inside gateway/platforms/discord.py allows hermes gateway to start and log in normally.

Proposed Fix (optional)

Consider reducing the size of the Discord /skill group by truncating descriptions, limiting registered skills, paging/grouping differently, or skipping skill registration when the generated command payload exceeds Discord's limits.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions