hermes - 💡(How to fix) Fix [Feature]: expose `discover_and_load(force=True)` via `hermes plugins install --reload` flag [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15626Fetched 2026-04-26 05:26:04
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4renamed ×1
RAW_BUFFERClick to expand / collapse

Problem or Use Case

PluginManager.discover_and_load(force=True) already exists at hermes_cli/plugins.py:523 and clears + rescans plugin state in-process. But no CLI command, no signal, and no IPC method exposes it to a running gateway. This means a user (or an agent) running inside the gateway has no way to install a plugin and have it bind without a full process restart.

After hermes plugins install <pkg> (hermes_cli/plugins_cmd.py:285-440), the CLI explicitly tells the user (line 437-438): "Restart the gateway for the plugin to take effect — hermes gateway restart".

This creates a real catch-22 for agentic flows where the agent itself is the entity invoking the install via its shell tool. The agent's shell runs inside the gateway it would need to restart, so it cannot complete the install end-to-end without breaking the conversation. SIGUSR1 graceful-drain still exits with code 75 and relies on a supervisor (systemd / launchd) to respawn — also problematic for non-systemd hosts.

This blocks autonomous agent installations of Hermes plugins (e.g. memory plugins, RAG integrations, etc.) where the human is not at the terminal. We see this routinely in our deployment — agents end up telling users to manually restart, breaking the flow.

Proposed Solution

Wire discover_and_load(force=True) to a CLI command. Two-flag surface:

  1. hermes plugins install <pkg> --reload — after install, call discover_and_load(force=True) against the running gateway via existing IPC (or via the SIGUSR2-style signal path, if needed).
  2. hermes plugins reload — standalone command for cases where the user wants to refresh after manual edits.

Behavior:

  • If gateway not running: --reload is a no-op + warning; the install still succeeds and next gateway start picks it up
  • If gateway running: triggers in-process refresh; existing in-flight requests complete; new ones see the new plugin
  • No process death, no PID file race, no supervisor dependency

Update the post-install message at hermes_cli/plugins_cmd.py:437-438 to:

"Plugin installed. Run hermes plugins reload to bind it without a gateway restart, or restart manually if reload mode is disabled."

Alternatives Considered

  1. Status quo (full restart) — works but breaks agentic flows. Catch-22 for agent-driven installs.
  2. SIGUSR1 graceful drain + supervisor respawn — current behavior; still exits code 75 + requires external supervisor. Doesn't solve agent-inside-gateway scenario.
  3. File-watcher (e.g. chokidar / watchdog watching the plugin config file) — works but requires a long-running daemon thread + adds moving parts. The CLI flag is the smallest delta — primitive already exists, just needs wiring.

Feature Type

CLI improvement

Scope

Small (single file, < 50 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Not applicable — this is a feature request, not a bug.

extent analysis

TL;DR

Implement a new CLI command hermes plugins reload and update the hermes plugins install command with a --reload flag to trigger discover_and_load(force=True) without requiring a gateway restart.

Guidance

  • Update hermes_cli/plugins_cmd.py to include the new --reload flag for hermes plugins install and create a standalone hermes plugins reload command.
  • Wire the new commands to call discover_and_load(force=True) via existing IPC or a signal path.
  • Modify the post-install message to inform users about the new hermes plugins reload command.
  • Consider handling cases where the gateway is not running, ensuring the --reload flag is a no-op with a warning.

Example

# hermes_cli/plugins_cmd.py
def install_plugin(pkg, reload=False):
    # ... install plugin code ...
    if reload:
        # Call discover_and_load(force=True) via IPC or signal path
        pass

def reload_plugins():
    # Call discover_and_load(force=True) via IPC or signal path
    pass

Notes

The proposed solution requires careful handling of edge cases, such as when the gateway is not running or when the --reload flag is used with a non-running gateway.

Recommendation

Apply the proposed workaround by implementing the new CLI commands and updating the post-install message, as it provides a straightforward solution to the problem without introducing significant complexity.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING