Skip to content

install on Hermes Agent: pre_llm_hook_install fails (mcp_servers + skill succeed) #2209

Closed

Description

@lhby2004

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-mcp 0.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 with enabled: [disk-cleanup] list, not a plugins.pre_llm_call array

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:

  1. Detect Hermes's plugin system and install via a Python plugin under plugins/codebase-memory/__init__.py (registering pre_llm_call), or
  2. Skip the pre_llm_call step for Hermes with a clear "not supported on this host" message instead of an opaque agent_config ... failed error, or
  3. Document the supported install path in README → "Known agent integrations" for Hermes.

Activity

  1. iandol commented on Sep 16, 2026

    @iandol

    Failing on Linux too:

    Hermes:
    error: agent_config agent=Hermes op=mcp_install path=/home/cog5/.hermes/config.yaml (target: regular file, 16980 bytes)
      mcp: /home/cog5/.hermes/config.yaml
      skill: /home/cog5/.hermes/skills/codebase-memory/SKILL.md (1 installed)
    error: agent_config agent=Hermes op=pre_llm_hook_install path=/home/cog5/.hermes/config.yaml (target: regular file, 16980 bytes)
      skill: /home/cog5/.copilot/skills/codebase-memory/SKILL.md (1 installed)
      agent: /home/cog5/.copilot/agents/codebase-memory-scout.agent.md
      agent: /home/cog5/.copilot/agents/codebase-memory.agent.md
      agent: /home/cog5/.copilot/agents/codebase-memory-auditor.agent.md
      hooks: SessionStart + SubagentStart (dynamic graph context)
    error: one or more agent configurations failed; the published/current executable was kept, and PATH/index cleanup was not attempted
    

    Uninstall also causes errors

    error: agent_config agent=Hermes op=pre_llm_hook_uninstall path=/home/cog5/.hermes/config.yaml (target: regular file, 16980 bytes)
    Hermes: preserved modified or foreign MCP entry
    Hermes: removed MCP config entry
    
  2. sbrodriguez commented on Sep 18, 2026

    @sbrodriguez

    Executing from TUI the command /reload-mcp, exit and reinstalling with install.sh script, the problem is solved.

    curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
    ...
    Install complete. Please restart your coding-agent sessions to properly take this into account.
    Restart your shell or run:
      source /Users/sergio/.zshrc
    Installed updater -> /Users/sergio/.local/bin/install.sh
    Installed: codebase-memory-mcp 0.11.0
    
    Done! Restart your coding agent to start using codebase-memory-mcp.
  3. added
    bugSomething isn't working
    priority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
    editor/integrationEditor compatibility and CLI integration
    on Sep 19, 2026
  4. DeusData commented on Sep 25, 2026

    @DeusData
    Owner

    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_call hook checked your whole config.yaml and refused anything it doesn't edit itself, such as enabled: [disk-cleanup] or platform_toolsets: cli: [hermes-cli]. Those are perfectly valid YAML, and even Hermes' own stock example config tripped it. The mcp_servers step 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 add hooks: pre_llm_call: - id/type/command, which matches Hermes' shell-hook format.

    @iandol, your mcp_install failure looks like a separate construct. If you can share a redacted copy of the mcp_servers: part of your config.yaml, we'd be glad to chase it too. Thanks again!

  5. iandol commented on Sep 29, 2026

    @iandol

    @DeusData -- here is that section (token redacted):

    mcp_servers:
      bookends-mcp:
        url: http://10.147.18.1:8787/mcp
        timeout: 10
      firecrawl:
        url: https://mcp.firecrawl.dev/v2/mcp
        headers:
          Authorization: Bearer fc-xxx
        timeout: 120
        connect_timeout: 60
      codebase-memory-mcp:
        command: /home/cog5/.local/bin/codebase-memory-mcp
  6. added a commit that references this issue on Sep 30, 2026
  7. DeusData commented on Sep 30, 2026

    @DeusData
    Owner

    Thank you again for reporting this, @lhby2004! The fix is now on main in 029919c (merged via #2355), and it will ship in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.windowsWindows-specific issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions