/reload-skills does not update Tab completion for newly installed skills
Description
After installing new skills and running /reload-skills, the command reports the new skills as added, but they do not appear in the Tab completion menu when typing / in the chat prompt. The only workaround is to restart the entire hermes session.
Root Cause
In cli.py, the module-level variable _skill_commands is assigned at startup:
# cli.py ~line 2149
_skill_commands = scan_skill_commands()
The Tab completion lambda captures this name:
# commands.py SlashCommandCompleter
skill_commands_provider=lambda: _skill_commands
When /reload-skills is invoked, it calls reload_skills() in agent/skill_commands.py, which internally does:
global _skill_commands
_skill_commands = {}
_skill_commands = scan_skill_commands() # creates a NEW dict object
This updates the skill_commands module's own _skill_commands, but cli.py's module-level _skill_commands still points to the old dict object created at startup. The Tab completion lambda resolves _skill_commands from cli.py's scope, so it always reads the stale data.
Steps to Reproduce
- Start
hermes chat
- Install a new skill (e.g. copy a skill directory to
~/.hermes/skills/)
- Run
/reload-skills — it prints "added N new skills"
- Type
/ and press Tab — the new skill commands are missing
- Restart hermes — now the new skills appear in Tab completion
Suggested Fix
In cli.py's _reload_skills() method, after calling reload_skills(), sync the module-level variable:
def _reload_skills(self, ...):
from agent.skill_commands import reload_skills, get_skill_commands
result = reload_skills()
# Sync cli.py's module-level _skill_commands so the
# Tab-completion lambda picks up the updated dict
global _skill_commands
_skill_commands = get_skill_commands()
...
Environment
- Hermes v0.13.0 (2026.5.7)
- macOS 14.5
- Python 3.11.11
/reload-skills does not update Tab completion for newly installed skills
Description
After installing new skills and running
/reload-skills, the command reports the new skills as added, but they do not appear in the Tab completion menu when typing/in the chat prompt. The only workaround is to restart the entire hermes session.Root Cause
In
cli.py, the module-level variable_skill_commandsis assigned at startup:The Tab completion lambda captures this name:
When
/reload-skillsis invoked, it callsreload_skills()inagent/skill_commands.py, which internally does:This updates the
skill_commandsmodule's own_skill_commands, but cli.py's module-level_skill_commandsstill points to the old dict object created at startup. The Tab completion lambda resolves_skill_commandsfrom cli.py's scope, so it always reads the stale data.Steps to Reproduce
hermes chat~/.hermes/skills/)/reload-skills— it prints "added N new skills"/and press Tab — the new skill commands are missingSuggested Fix
In
cli.py's_reload_skills()method, after callingreload_skills(), sync the module-level variable:Environment