hermes - 💡(How to fix) Fix Bug: discover_plugins() exceptions silently swallowed at DEBUG in gateway and CLI startup [3 pull requests]

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…

discover_plugins() exceptions are caught and logged at DEBUG level in two places, both invisible at the default INFO log level (config.yaml logging.level: INFO). If ANY plugin import fails at startup — syntax error, missing dependency, import cycle — the operator gets zero indication unless they bump log level to DEBUG.

Error Message

try: from hermes_cli.plugins import discover_plugins discover_plugins() except Exception: logger.debug( "plugin discovery failed at gateway startup", exc_info=True, )

Root Cause

discover_plugins() exceptions are caught and logged at DEBUG level in two places, both invisible at the default INFO log level (config.yaml logging.level: INFO). If ANY plugin import fails at startup — syntax error, missing dependency, import cycle — the operator gets zero indication unless they bump log level to DEBUG.

Fix Action

Fixed

Code Example

try:
    from hermes_cli.plugins import discover_plugins
    discover_plugins()
except Exception:
    logger.debug(
        "plugin discovery failed at gateway startup", exc_info=True,
    )

---

try:
    from hermes_cli.plugins import discover_plugins
    discover_plugins()
except Exception:
    logger.debug(
        "plugin discovery failed at CLI startup",
        exc_info=True,
    )
RAW_BUFFERClick to expand / collapse

Description

discover_plugins() exceptions are caught and logged at DEBUG level in two places, both invisible at the default INFO log level (config.yaml logging.level: INFO). If ANY plugin import fails at startup — syntax error, missing dependency, import cycle — the operator gets zero indication unless they bump log level to DEBUG.

Affected locations

1. Gateway startup — gateway/run.py line 3477

try:
    from hermes_cli.plugins import discover_plugins
    discover_plugins()
except Exception:
    logger.debug(
        "plugin discovery failed at gateway startup", exc_info=True,
    )

2. CLI startup — hermes_cli/main.py line 12502

try:
    from hermes_cli.plugins import discover_plugins
    discover_plugins()
except Exception:
    logger.debug(
        "plugin discovery failed at CLI startup",
        exc_info=True,
    )

Reproduce

  1. Install a broken plugin (e.g., one with a syntax error in __init__.py)
  2. Restart gateway or CLI with default logging.level: INFO
  3. Observe: no error in agent.log, gateway.log, errors.log, or stderr
  4. Set HERMES_PLUGINS_DEBUG=1 or bump log level to DEBUG → error appears

Expected behavior

logger.warning(...) — so the failure is visible at default INFO level. Plugin discovery failures should never be silent at production log levels.

Impact

Operators can deploy broken plugins and not know they failed to load. The plugin appears enabled in config but silently does nothing. Diagnosing requires either setting HERMES_PLUGINS_DEBUG=1 (undocumented for most users) or editing config to raise log level.

Suggested fix

Change logger.debug(...)logger.warning(...) in both locations.

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…

FAQ

Expected behavior

logger.warning(...) — so the failure is visible at default INFO level. Plugin discovery failures should never be silent at production log levels.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING