Skip to content

Discord slash command sync fails with error 50035 when /skill group exceeds 8KB payload limit #10259

@zeapsu

Description

@zeapsu

Bug Description

With 80+ default skills organized into 19 categories, the /skill slash command group serializes to ~14,207 bytes — nearly double Discord's ~8,000 byte per-command payload limit. When tree.sync() submits this oversized payload, Discord returns:

400 Bad Request (error code: 50035): Invalid Form Body — Command exceeds maximum size (8000)

This rejects the entire batch of slash commands, including the 27 base commands (/model, /background, /new, etc.). As a result, users see zero slash commands in Discord after starting the gateway.

Root Cause

_register_skill_group() in gateway/platforms/discord.py registers all skills as a single nested /skill command with category subcommand groups. The serialized JSON payload (names + descriptions for ~80 subcommands) exceeds Discord's per-command size limit.

The payload breakdown:

  • Total /skill group: ~14,207 bytes (77% over 8KB limit)
  • Largest single category: /skill mlops at 3,549 bytes
  • All individual categories fit easily under 8KB

Environment

  • Hermes Agent version: latest main (post commit 10494b42)
  • Skills installed: default 80+ skills (19 categories)
  • Discord library: discord.py 2.x

Impact

  • Severity: High — blocks ALL slash command functionality on the Discord platform
  • Scope: Universal — affects every installation with the default skill set
  • Workaround: None — removing skills is the only way to fit under the limit

Suggested Fix

Split the /skill group into multiple per-category top-level groups when the payload would exceed 8KB:

  • Small skill sets → original /skill group (backward compatible)
  • Large skill sets → /skill-mlops, /skill-creative, /skill-github, etc.

I've implemented this in PR #10261.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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