hermes - 💡(How to fix) Fix Plugin API for startup advisories (between banner and prompt)

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…

Fix Action

Fix / Workaround

Workarounds considered

Code Example

def register(ctx):
    ctx.register_startup_advisory(lambda: "⚠ Update available: 0.3.8 → 0.3.10")

---

ctx.register_hook("after_banner", lambda **kw: print("...", file=sys.stderr))
RAW_BUFFERClick to expand / collapse

Problem

Plugins have no way to display a one-line message at startup that the user will reliably see. The two channels currently available both fail:

  1. ctx.inject_message from register() drops the message silently. discover_plugins() runs at module-import time of model_tools.py (line 195), which executes before HermesCLI.__init__ sets _cli_ref (cli.py:11666). The check at hermes_cli/plugins.py:359-362 then logs "inject_message: no CLI reference (not available in gateway mode)" and returns False.

  2. print() from register() is rendered, but cli.py:11555 then prints \n * (terminal_height - 1) to push the TUI to the bottom of the terminal — this pushes any plugin output into scrollback. On a typical terminal the banner is tall enough that the plugin's message is no longer visible.

What Hermes does for itself

Hermes's own update check is embedded directly in the welcome banner via banner.py:660-664, appending a ⚠ N commits behind line to the right column of the panel. cli.py:11562 then calls self._show_security_advisories() which prints to stderr right after the banner. Both are private code paths — no plugin can register into them.

Use case

My plugin (Hermes Dreaming) checks for a new GitHub release on startup and wants to surface a one-line Update available: X → Y. Run: hermes plugins update hermes-dreaming message. Any plugin that wants to nag the user about an update, a stale auth token, a deprecated config key, etc. faces the same problem.

Proposed API

A plugin-registered startup advisory, rendered between the banner and the welcome text (same slot as _show_security_advisories):

def register(ctx):
    ctx.register_startup_advisory(lambda: "⚠ Update available: 0.3.8 → 0.3.10")

Or a hook:

ctx.register_hook("after_banner", lambda **kw: print("...", file=sys.stderr))

Either would let plugins emit a visible, non-scrolled-off message without injecting into the conversation (which costs LLM tokens and looks odd in chat history).

Workarounds considered

  • inject_message from on_session_start — fires only for new sessions (not --continue), and after the user's first message; the agent will respond to the injected message which costs tokens.
  • Delayed background-thread print() — races with prompt_toolkit taking over the TTY; can garble the prompt.

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