hermes - 💡(How to fix) Fix Shell hook entries with invalid/gateway-only event names silently ignored with no warning (e.g. `agent:end` in config.yaml) [1 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…

When a shell hook is configured in config.yaml using a gateway event name (such as agent:end, agent:start, agent:step) instead of a valid plugin hook event name (such as post_llm_call, on_session_end), the entry is silently dropped. hermes hooks list reports "No shell hooks configured" as if the hooks: block were empty.

This is a realistic mistake because the hooks documentation covers gateway hooks and shell hooks on the same page. The gateway events table clearly lists agent:end as a valid event. A user reading the docs top-to-bottom can easily copy a gateway event name into their config.yaml shell hook definition and receive zero feedback that the hook will never fire.

Error Message

No error. No warning. No indication that agent:end is not a valid shell hook event.

Root Cause

The hermes hooks test <event> command does print valid events when called with an unrecognised name, but a user whose hook silently isn’t registering has no obvious reason to run that command. Silent failures in hook configuration waste significant debugging time.

Fix Action

Fixed

Code Example

hooks:
  agent:end:                    # gateway event — invalid for shell hooks
    - command: /path/to/hook.py
    -       timeout: 30
    - hooks_auto_accept: true
    -

---

hermes hooks list

---

No shell hooks configured in ~/.hermes/config.yaml.

---

Warning: 'agent:end' is not a valid shell hook event and will be ignored.
  Gateway events (agent:start, agent:end, agent:step) only fire in gateway hooks.
  Did you mean 'post_llm_call' or 'on_session_end'?
  Valid shell hook events: on_session_end, post_llm_call, pre_tool_call, ...
RAW_BUFFERClick to expand / collapse

Environment

  • Hermes Agent: v0.14.0 (2026.5.16)
    • OS: Debian 13 (Trixie)

Description

When a shell hook is configured in config.yaml using a gateway event name (such as agent:end, agent:start, agent:step) instead of a valid plugin hook event name (such as post_llm_call, on_session_end), the entry is silently dropped. hermes hooks list reports "No shell hooks configured" as if the hooks: block were empty.

This is a realistic mistake because the hooks documentation covers gateway hooks and shell hooks on the same page. The gateway events table clearly lists agent:end as a valid event. A user reading the docs top-to-bottom can easily copy a gateway event name into their config.yaml shell hook definition and receive zero feedback that the hook will never fire.

Steps to Reproduce

Add to ~/.hermes/config.yaml:

hooks:
  agent:end:                    # gateway event — invalid for shell hooks
    - command: /path/to/hook.py
    -       timeout: 30
    - hooks_auto_accept: true
    - ```
Then run:

```bash
hermes hooks list

Actual Result

No shell hooks configured in ~/.hermes/config.yaml.

No error. No warning. No indication that agent:end is not a valid shell hook event.

Expected Result

A warning such as:

Warning: 'agent:end' is not a valid shell hook event and will be ignored.
  Gateway events (agent:start, agent:end, agent:step) only fire in gateway hooks.
  Did you mean 'post_llm_call' or 'on_session_end'?
  Valid shell hook events: on_session_end, post_llm_call, pre_tool_call, ...

Suggested Fix

In register_from_config() in agent/shell_hooks.py, after parsing the hooks: block, check each event key against VALID_HOOKS and emit a logger.warning() for any unrecognised event name, including a "did you mean?" suggestion for common gateway event names.

The valid event list is already returned by hermes hooks test <invalid-event> — this same list should be used for the warning.

Why This Matters

The hermes hooks test <event> command does print valid events when called with an unrecognised name, but a user whose hook silently isn’t registering has no obvious reason to run that command. Silent failures in hook configuration waste significant debugging time.

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

hermes - 💡(How to fix) Fix Shell hook entries with invalid/gateway-only event names silently ignored with no warning (e.g. `agent:end` in config.yaml) [1 pull requests]