Repository navigation
install on Hermes Agent: pre_llm_hook_install fails (mcp_servers + skill succeed) #2209
Description
Summary
codebase-memory-mcp install on Hermes Agent (Windows 11, v0.10.8) successfully registers the MCP server and the codebase-memory skill, but the pre_llm_call hook install step fails with an opaque error and the install reports "activation stopped after one or more agent configuration or cleanup operations failed."
Environment
codebase-memory-mcp0.10.8 (build b4b403b1d7c4def3785f148b93f345ce8427858f4f5489ce28580c4387a336a6)- Platform: Windows 11 25H2, PowerShell + Git Bash
- Target: Hermes Agent (HERMES_HOME=C:\Users\great\AppData\Local\hermes)
- Hermes config.yaml current state — uses a
plugins:section withenabled: [disk-cleanup]list, not aplugins.pre_llm_callarray
Reproduction
$ codebase-memory-mcp install -y
codebase-memory-mcp install 0.10.8
Found 2 existing index(es). Keeping them. After install, re-index...
Installed binary -> C:/Users/great/.local/bin/codebase-memory-mcp.exe
Detected agents: Hermes CodeBuddy Code CLI
Hermes:
mcp: ...\hermes\config.yaml [OK]
skill: ...\skills\codebase-memory\SKILL.md (1 installed) [OK]
hook: ...\config.yaml (pre_llm_call) [FAIL]
CodeBuddy Code CLI:
... [OK]
error: agent_config agent=Hermes op=pre_llm_hook_install path=C:\Users\great\AppData\Local\hermes/config.yaml (target: regular file, 5157 bytes)
error: one or more agent configurations failed; the published/current executable was kept, and PATH/index cleanup was not attempted
error: activation stopped after one or more agent configuration or cleanup operations failed; the published/current executable was kept, and configuration changes that completed may remain. Please restart your coding-agent sessions after resolving the errors above.
Activation log (~/.cache/codebase-memory-mcp/logs/activation-events.ndjson):
{"event":"cbm.activation","phase":"failed","action":"install","requester_pid":7176,"timestamp_unix_s":1789439252,...,"detail":"published/current binary retained; agent configuration refresh or cleanup incomplete"}Likely cause
Hermes's plugin system is invoked via invoke_hook("pre_llm_call", ...) (agent/turn_context.py); plugins register as Python packages under plugins/<name>/__init__.py with a config_schema.py, not as YAML array entries.
The cbm install path appears to try writing a pre_llm_call entry directly into config.yaml, but Hermes's config schema has no such key — it has plugins.enabled: [...] for top-level enable and a Python plugin loader for hook registration. The error "target: regular file, 5157 bytes" looks like a validation failure on a YAML schema that doesn't match Hermes's config layout.
Workaround
The remaining 2/3 of the install works (mcp_servers entry + skill), so the agent can still call cbm's 15 tools via MCP and trigger them via the skill. Only the optional pre_llm_call automatic index-on-every-turn hook is broken — which is arguably the safer default anyway.
Suggestion
Either:
- Detect Hermes's plugin system and install via a Python plugin under
plugins/codebase-memory/__init__.py(registeringpre_llm_call), or - Skip the pre_llm_call step for Hermes with a clear "not supported on this host" message instead of an opaque
agent_config ... failederror, or - Document the supported install path in README → "Known agent integrations" for Hermes.
Activity
iandol commentedon Sep 16, 2026
Failing on Linux too:
Uninstall also causes errors
sbrodriguez commentedon Sep 18, 2026
Executing from TUI the command /reload-mcp, exit and reinstalling with install.sh script, the problem is solved.
DeusData commentedon Sep 25, 2026
Thank you @lhby2004 for such a clear report, with the exact failing op, the file size and the activation log. Thanks also @iandol for confirming it on Linux and spotting the uninstall side, and @sbrodriguez for sharing what worked for you.
The cause: the step that adds the
pre_llm_callhook checked your whole config.yaml and refused anything it doesn't edit itself, such asenabled: [disk-cleanup]orplatform_toolsets: cli: [hermes-cli]. Those are perfectly valid YAML, and even Hermes' own stock example config tripped it. Themcp_serversstep on the same file only checks the part it touches, which is why that step worked.The fix (#2355) brings the hook step in line: it now checks only the
hooks:section it writes and treats the rest of your file as yours, untouched. Install, reinstall and uninstall now work on the stock Hermes config, and we addhooks: pre_llm_call: - id/type/command, which matches Hermes' shell-hook format.@iandol, your
mcp_installfailure looks like a separate construct. If you can share a redacted copy of themcp_servers:part of your config.yaml, we'd be glad to chase it too. Thanks again!iandol commentedon Sep 29, 2026
@DeusData -- here is that section (token redacted):
Merge pull request #2355 from DeusData/fix/issue-2209
fix(install): Hermes hook edit no longer refuses unrelated YAML secti…
DeusData commentedon Sep 30, 2026
Thank you again for reporting this, @lhby2004! The fix is now on
mainin 029919c (merged via #2355), and it will ship in the next release.