Skip to content

Slash-skill load failures are queued as input instead of surfacing an error #14713

@NewTurn2017

Description

@NewTurn2017

Bug Description

When a slash-skill is registered but its payload fails to load, the CLI treats the failure string as a successful command payload and queues it into _pending_input instead of surfacing a user-facing error.

Affected files / lines

  • agent/skill_commands.py:311-313build_skill_invocation_message() returns a truthy error string like [Failed to load skill: plan]
  • cli.py:5569-5579 — generic skill command path only checks truthiness before queueing
  • cli.py:5629-5646/plan path only checks if not msg, so the failure string is queued too

Why this is a bug

A runtime skill-load failure is converted into fake conversational input. The model receives an error sentinel as if it were a real user/system payload, while the CLI prints a success message (Plan mode queued...). This is a silent failure mode and can confuse both the user and the model.

Minimal reproduction

cd /Users/genie/.hermes/hermes-agent
source venv/bin/activate
python - <<'PY'
from queue import Queue
from unittest.mock import patch
import cli

obj = object.__new__(cli.HermesCLI)
obj.session_id = "repro"
obj._pending_input = Queue()

with patch("cli.build_plan_path", return_value="plans/test.md"), \
     patch("cli.build_skill_invocation_message", return_value="[Failed to load skill: plan]"):
    cli.HermesCLI._handle_plan_command(obj, "/plan investigate bug")
    print("queued", not obj._pending_input.empty())
    if not obj._pending_input.empty():
        print("payload", obj._pending_input.get())
PY

Observed output includes:

  • Plan mode queued via skill...
  • queued True
  • payload [Failed to load skill: plan]

Expected Behavior

If a skill payload fails to load, the CLI should show an error and avoid queueing any payload.

Actual Behavior

The CLI announces success and queues the failure sentinel as input.

Suggested investigation direction

Make build_skill_invocation_message() return a structured failure result (or None plus logged error) instead of a truthy string, and update /plan plus generic skill dispatch to reject error sentinels explicitly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cliCLI entry point, hermes_cli/, setup wizardtool/skillsSkills system (list, view, manage)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