install.sh appends agency-agents-router to plugins.disabled when config has both enabled: and disabled: lists

Author: passwordless-OTPCreated Sep 22, 2026Updated Sep 24, 2026

Environment

  • install.sh at current main (also reproduced with the extracted python block, lines 1089-1240)
  • Hermes config shape: plugins: block with sibling enabled: and disabled: lists (the default Hermes config shape — Hermes populates a long disabled: list)

What happens

Running ./scripts/install.sh --tool hermes on a config with both lists appends - agency-agents-router to the END of the disabled: list (i.e. it disables the plugin), while printing Done! Installed 1 tool(s). No error, no warning.

Reproduction

Minimal config:

yaml
plugins:
  enabled:
    - alpha
    - beta
  disabled:
    - gamma
    - delta
hooks_auto_accept: false

Run install.sh --tool hermes. Result:

yaml
plugins:
  enabled:
    - alpha
    - beta
  disabled:
    - gamma
    - delta
    - agency-agents-router   # <-- added to disabled, not enabled

Root cause

ensure_hermes_plugin_enabled (install.sh:1109-1132): the block-boundary scan stops only at NON-indented lines. disabled: is indented (sibling under plugins:), so the scan never notices the enabled list ended. Case 4 (install.sh:1215-1239) then inserts after the LAST - item in the whole block — which is the end of the disabled: list.

Also observed: if enabled: is empty when install runs, the plugin lands in enabled: correctly BUT a pre-existing disabled: entry is left behind — the plugin then appears in BOTH lists (installer never removes the stale disabled entry).

Suggested fix

Stop the item/block scan at the disabled: (and entries:) boundary, so insertion points and has_plugin_already detection only consider the enabled list. Also remove a stale - agency-agents-router from disabled: when enabling.

Workaround for users

hermes plugins enable --no-allow-tool-override agency-agents-router moves the plugin to enabled and cleans the disabled entry.

Verification notes

  • Reproduced with the extracted python from current main against a synthetic config.
  • Workaround verified in a clean HERMES_HOME.
  • Related history: #714 (4-space indent corruption), #839 — this is a sibling of the same enabled-list handling bug class.

Source: msitarzewski/agency-agents