From fc78e708ed0c684c20987b23657208c76d45fc5a Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 30 Apr 2026 22:44:41 -0700 Subject: [PATCH] fix(update): don't crash hermes update if skill config scan fails (#18257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `hermes update` ran the config migration (11 → 17) successfully then crashed at `agent/skill_utils.py:340` during the post-migration skill-config prompt. User @FlockonUS reported this on Twitter. Root cause: `get_missing_skill_config_vars` in hermes_cli/config.py only guarded the import of `discover_all_skill_config_vars`, not the call. Any runtime exception inside the skill scan (malformed SKILL.md, unreadable external skill dir, etc.) propagated up through `migrate_config` and aborted `hermes update` after the version bump. Wrap the call in try/except so skill-config prompting — which is a post-migration nicety — can never block the migration itself. --- hermes_cli/config.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hermes_cli/config.py b/hermes_cli/config.py index d39246767..82498c81c 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -2437,7 +2437,17 @@ def get_missing_skill_config_vars() -> List[Dict[str, Any]]: except Exception: return [] - all_vars = discover_all_skill_config_vars() + try: + all_vars = discover_all_skill_config_vars() + except Exception as e: + # A malformed SKILL.md, unreadable external skill dir, or similar + # should never break `hermes update`. Skill-config prompting is a + # post-migration nicety, not a blocker. + import logging + logging.getLogger(__name__).debug( + "discover_all_skill_config_vars failed: %s", e + ) + return [] if not all_vars: return []