hermes - 💡(How to fix) Fix bug: background review blocks MCP memory tools when using external memory provider [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 using agentmemory as an external memory provider (via memory.provider: agentmemory and mcp_servers.agentmemory), the background review agent cannot use MCP memory tools (memory_save, memory_recall, memory_search) because they are blocked by the hardcoded whitelist.

Error Message

Background review denied non-whitelisted tool: mcp_agentmemory_memory_save (attempt 1)
Tool memory returned error: Memory at 2,890/3,000 chars. Adding this entry (399 chars) would exceed the limit. Replace or remove existing entries first.

Root Cause

When using agentmemory as an external memory provider (via memory.provider: agentmemory and mcp_servers.agentmemory), the background review agent cannot use MCP memory tools (memory_save, memory_recall, memory_search) because they are blocked by the hardcoded whitelist.

Fix Action

Fixed

Code Example

memory:
  provider: agentmemory
mcp_servers:
  agentmemory:
    command: npx
    args: ["-y", "@agentmemory/mcp"]

---

Background review denied non-whitelisted tool: mcp_agentmemory_memory_save (attempt 1)
Tool memory returned error: Memory at 2,890/3,000 chars. Adding this entry (399 chars) would exceed the limit. Replace or remove existing entries first.

---

background_review:
  extra_toolsets:
    - mcp-agentmemory
RAW_BUFFERClick to expand / collapse

Description

When using agentmemory as an external memory provider (via memory.provider: agentmemory and mcp_servers.agentmemory), the background review agent cannot use MCP memory tools (memory_save, memory_recall, memory_search) because they are blocked by the hardcoded whitelist.

Steps to Reproduce

  1. Configure Hermes with agentmemory as memory provider:
memory:
  provider: agentmemory
mcp_servers:
  agentmemory:
    command: npx
    args: ["-y", "@agentmemory/mcp"]
  1. Install the agentmemory plugin to ~/.hermes/plugins/agentmemory/
  2. Have a conversation and trigger a background review
  3. Check logs for: Background review denied non-whitelisted tool: mcp_agentmemory_memory_save

Expected Behavior

Background review should be able to use MCP memory tools when the memory provider is set to agentmemory. The review agent needs these tools to consolidate memory entries when the built-in memory is full.

Actual Behavior

Background review can only use tools from enabled_toolsets=["memory", "skills"] (line 462 in agent/background_review.py). MCP tools from agentmemory are in the mcp-agentmemory toolset, which is not in the whitelist. This causes:

  1. Background review calls built-in memory tool → fails with Memory at limit
  2. Cannot switch to memory_save (MCP) → blocked by whitelist
  3. Memory consolidation never happens → agent forgets things

Logs

Background review denied non-whitelisted tool: mcp_agentmemory_memory_save (attempt 1)
Tool memory returned error: Memory at 2,890/3,000 chars. Adding this entry (399 chars) would exceed the limit. Replace or remove existing entries first.

Proposed Fix

Add a config option to extend the background review whitelist:

background_review:
  extra_toolsets:
    - mcp-agentmemory

Or automatically include MCP tools from the configured memory provider in the whitelist.

Related Issues

  • #27422 - read_file blocked in background review (same pattern)
  • #29568 - Inherit parent's toolset config for cache stability
  • #6715 - agentmemory integration with Hermes

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 bug: background review blocks MCP memory tools when using external memory provider [1 pull requests]