Skip to content

fix: respect per-platform disabled skills in Telegram menu and gateway dispatch#4799

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-31074029
Apr 3, 2026
Merged

fix: respect per-platform disabled skills in Telegram menu and gateway dispatch#4799
teknium1 merged 1 commit into
mainfrom
hermes/hermes-31074029

Conversation

@teknium1

@teknium1 teknium1 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Three interconnected bugs caused hermes skills config per-platform settings to be silently ignored. The config was written correctly to config.yaml, but nothing read it at the points where it mattered.

Reported by SteveSkedasticity (CLAW community) — he configured disabled skills for Telegram via hermes skills config, but after gateway restart the commands still showed up and consumed Telegram's 100 slash command cap.

What changed

Bug 1: Telegram menu (hermes_cli/commands.py)

telegram_menu_commands() built the slash command list from get_skill_commands() without checking per-platform disabled status. Disabled skills consumed menu slots, hitting the 100 command cap.

Fix: Load disabled skills for platform="telegram" and filter them from skill entries before adding to the menu.

Bug 2: Gateway dispatch (gateway/run.py)

When a user typed a disabled skill command on any platform, the gateway executed it because get_skill_commands() (process-global cache) only filters by the global disabled list at scan time. The existing _check_unavailable_skill() function was disabled-aware but unreachable — it lived in the else branch that only runs when the command is NOT in skill_cmds.

Fix: Added per-platform disabled check before execution. Returns an actionable message ("skill is disabled for telegram, enable with hermes skills config") instead of silently executing.

Bug 3: Env var mismatch (agent/skill_utils.py)

get_disabled_skill_names() only checked HERMES_PLATFORM env var, but the gateway sets HERMES_SESSION_PLATFORM instead. Per-platform config was silently ignored in the system prompt path too.

Fix: Added HERMES_SESSION_PLATFORM as fallback, plus an explicit platform= parameter for callers that already know their platform. Also added platform to prompt_builder.py's skills cache key so multi-platform gateways produce correct per-platform skill prompts.

Files changed

File Change
agent/skill_utils.py Added platform param + HERMES_SESSION_PLATFORM fallback
agent/prompt_builder.py Added platform to skills prompt cache key
hermes_cli/commands.py Filter telegram-disabled skills from menu
gateway/run.py Check per-platform disabled before executing skill commands
tests/hermes_cli/test_skills_config.py 6 new tests for platform param & env var precedence
tests/hermes_cli/test_commands.py 1 new test for telegram menu filtering

Test results

  • All 862/862 hermes_cli tests pass (1 pre-existing failure unrelated)
  • All 506/506 agent tests pass
  • All 3949/3949 tools+gateway tests pass (10 pre-existing failures unrelated)
  • E2E verified: disabled skills excluded from menu, env var precedence correct

…y dispatch

Three interconnected bugs caused `hermes skills config` per-platform
settings to be silently ignored:

1. telegram_menu_commands() never filtered disabled skills — all skills
   consumed menu slots regardless of platform config, hitting Telegram's
   100 command cap. Now loads disabled skills for 'telegram' and excludes
   them from the menu.

2. Gateway skill dispatch executed disabled skills because
   get_skill_commands() (process-global cache) only filters by the global
   disabled list at scan time. Added per-platform check before execution,
   returning an actionable 'skill is disabled' message.

3. get_disabled_skill_names() only checked HERMES_PLATFORM env var, but
   the gateway sets HERMES_SESSION_PLATFORM instead. Added
   HERMES_SESSION_PLATFORM as fallback, plus an explicit platform=
   parameter for callers that know their platform (menu builder, gateway
   dispatch). Also added platform to prompt_builder's skills cache key
   so multi-platform gateways get correct per-platform skill prompts.

Reported by SteveSkedasticity (CLAW community).
@teknium1 teknium1 merged commit 5db630a into main Apr 3, 2026
5 of 6 checks passed
jooray added a commit to jooray/hermes-agent that referenced this pull request Apr 3, 2026
* upstream/main: (38 commits)
  fix(memory): Fix ByteRover plugin - run brv query synchronously before LLM call
  chore: release v0.7.0 (2026.4.3) (NousResearch#4812)
  fix: route memory provider tools in sequential execution path (NousResearch#4803)
  fix: persist API server sessions to shared SessionDB (state.db) (NousResearch#4802)
  fix(discord): register /approve and /deny slash commands, wire up button-based approval UI (NousResearch#4800)
  fix: respect per-platform disabled skills in Telegram menu and gateway dispatch (NousResearch#4799)
  fix(gateway): route /approve and /deny through running-agent guard (NousResearch#4798)
  docs: add community FAQ entries — multi-model workflows, WhatsApp binding, verbose control, skills config, thread sessions, migration, install troubleshooting (NousResearch#4797)
  fix: handle None mcp_servers in _get_platform_tools()
  fix(mcp): stability fix pack — reload timeout, shutdown cleanup, event loop handler, OAuth non-blocking (NousResearch#4757)
  fix: prevent compression death spiral from API disconnects (NousResearch#2153) (NousResearch#4750)
  fix: handle Anthropic Sonnet long-context tier 429 by reducing to 200k (NousResearch#4747)
  fix: correct qwen3.6-plus model slug
  fix: handle Anthropic long-context tier 429 by reducing to 200k
  docs(acp): fix zed config
  fix: use get_hermes_home(), consolidate git_cmd, update tests
  Add fork detection and upstream sync to hermes update
  fix(update): handle conflicted git index during hermes update (NousResearch#4735)
  fix: remove redundant restart message from update launchd path
  fix(update): avoid launchd restart race on macOS
  ...
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…y dispatch (NousResearch#4799)

Three interconnected bugs caused `hermes skills config` per-platform
settings to be silently ignored:

1. telegram_menu_commands() never filtered disabled skills — all skills
   consumed menu slots regardless of platform config, hitting Telegram's
   100 command cap. Now loads disabled skills for 'telegram' and excludes
   them from the menu.

2. Gateway skill dispatch executed disabled skills because
   get_skill_commands() (process-global cache) only filters by the global
   disabled list at scan time. Added per-platform check before execution,
   returning an actionable 'skill is disabled' message.

3. get_disabled_skill_names() only checked HERMES_PLATFORM env var, but
   the gateway sets HERMES_SESSION_PLATFORM instead. Added
   HERMES_SESSION_PLATFORM as fallback, plus an explicit platform=
   parameter for callers that know their platform (menu builder, gateway
   dispatch). Also added platform to prompt_builder's skills cache key
   so multi-platform gateways get correct per-platform skill prompts.

Reported by SteveSkedasticity (CLAW community).
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…y dispatch (NousResearch#4799)

Three interconnected bugs caused `hermes skills config` per-platform
settings to be silently ignored:

1. telegram_menu_commands() never filtered disabled skills — all skills
   consumed menu slots regardless of platform config, hitting Telegram's
   100 command cap. Now loads disabled skills for 'telegram' and excludes
   them from the menu.

2. Gateway skill dispatch executed disabled skills because
   get_skill_commands() (process-global cache) only filters by the global
   disabled list at scan time. Added per-platform check before execution,
   returning an actionable 'skill is disabled' message.

3. get_disabled_skill_names() only checked HERMES_PLATFORM env var, but
   the gateway sets HERMES_SESSION_PLATFORM instead. Added
   HERMES_SESSION_PLATFORM as fallback, plus an explicit platform=
   parameter for callers that know their platform (menu builder, gateway
   dispatch). Also added platform to prompt_builder's skills cache key
   so multi-platform gateways get correct per-platform skill prompts.

Reported by SteveSkedasticity (CLAW community).
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…y dispatch (NousResearch#4799)

Three interconnected bugs caused `hermes skills config` per-platform
settings to be silently ignored:

1. telegram_menu_commands() never filtered disabled skills — all skills
   consumed menu slots regardless of platform config, hitting Telegram's
   100 command cap. Now loads disabled skills for 'telegram' and excludes
   them from the menu.

2. Gateway skill dispatch executed disabled skills because
   get_skill_commands() (process-global cache) only filters by the global
   disabled list at scan time. Added per-platform check before execution,
   returning an actionable 'skill is disabled' message.

3. get_disabled_skill_names() only checked HERMES_PLATFORM env var, but
   the gateway sets HERMES_SESSION_PLATFORM instead. Added
   HERMES_SESSION_PLATFORM as fallback, plus an explicit platform=
   parameter for callers that know their platform (menu builder, gateway
   dispatch). Also added platform to prompt_builder's skills cache key
   so multi-platform gateways get correct per-platform skill prompts.

Reported by SteveSkedasticity (CLAW community).
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…y dispatch (NousResearch#4799)

Three interconnected bugs caused `hermes skills config` per-platform
settings to be silently ignored:

1. telegram_menu_commands() never filtered disabled skills — all skills
   consumed menu slots regardless of platform config, hitting Telegram's
   100 command cap. Now loads disabled skills for 'telegram' and excludes
   them from the menu.

2. Gateway skill dispatch executed disabled skills because
   get_skill_commands() (process-global cache) only filters by the global
   disabled list at scan time. Added per-platform check before execution,
   returning an actionable 'skill is disabled' message.

3. get_disabled_skill_names() only checked HERMES_PLATFORM env var, but
   the gateway sets HERMES_SESSION_PLATFORM instead. Added
   HERMES_SESSION_PLATFORM as fallback, plus an explicit platform=
   parameter for callers that know their platform (menu builder, gateway
   dispatch). Also added platform to prompt_builder's skills cache key
   so multi-platform gateways get correct per-platform skill prompts.

Reported by SteveSkedasticity (CLAW community).
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…y dispatch (NousResearch#4799)

Three interconnected bugs caused `hermes skills config` per-platform
settings to be silently ignored:

1. telegram_menu_commands() never filtered disabled skills — all skills
   consumed menu slots regardless of platform config, hitting Telegram's
   100 command cap. Now loads disabled skills for 'telegram' and excludes
   them from the menu.

2. Gateway skill dispatch executed disabled skills because
   get_skill_commands() (process-global cache) only filters by the global
   disabled list at scan time. Added per-platform check before execution,
   returning an actionable 'skill is disabled' message.

3. get_disabled_skill_names() only checked HERMES_PLATFORM env var, but
   the gateway sets HERMES_SESSION_PLATFORM instead. Added
   HERMES_SESSION_PLATFORM as fallback, plus an explicit platform=
   parameter for callers that know their platform (menu builder, gateway
   dispatch). Also added platform to prompt_builder's skills cache key
   so multi-platform gateways get correct per-platform skill prompts.

Reported by SteveSkedasticity (CLAW community).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant