-
Notifications
You must be signed in to change notification settings - Fork 33.6k
[Bug]: Skill load failure is treated as successful slash-command invocation #11200
Copy link
Copy link
Open
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt builderCore agent loop, run_agent.py, prompt buildercomp/cliCLI entry point, hermes_cli/, setup wizardCLI entry point, hermes_cli/, setup wizardcomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliverytool/skillsSkills system (list, view, manage)Skills system (list, view, manage)type/bugSomething isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt builderCore agent loop, run_agent.py, prompt buildercomp/cliCLI entry point, hermes_cli/, setup wizardCLI entry point, hermes_cli/, setup wizardcomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliverytool/skillsSkills system (list, view, manage)Skills system (list, view, manage)type/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Description
build_skill_invocation_message()returns a non-empty placeholder string ([Failed to load skill: ...]) when the skill exists in the command cache but loading the actualSKILL.mdpayload fails. CLI/gateway callers treat any truthy return value as success, so the failure is silently routed into the model as if it were a valid skill prompt.Affected files / lines
agent/skill_commands.py:311-313cli.py:5571-5580gateway/run.py:2877-2882gateway/platforms/webhook.py:383-388Why this is a bug
The callers do
if msg:to distinguish success from load failure. Returning a truthy error string bypasses the user-facing error path and injects a bracketed failure note into agent input.So a missing/deleted/corrupt skill can look like a successful slash-command invocation, while the model receives
[Failed to load skill: ...]as conversation content.Minimal reproduction / evidence
I reproduced this on
mainby scanning a temporary skill, deletingSKILL.md, then invoking the cached command:Observed output:
Relevant implementation:
Expected Behavior
Load failure should be surfaced as a real failure signal to the caller (for example
Noneor an exception/result object), so the UI/gateway can showFailed to load skill ...to the user instead of enqueuing bogus prompt text.Actual Behavior
Load failure returns a truthy string, and callers proceed as though skill loading succeeded.
Suggested investigation direction
build_skill_invocation_message()to return a falsey/error-typed result on load failure.