hermes - 💡(How to fix) Fix Memory-provider tools (honcho_*) fail with "Unknown tool" on single-tool-call turns [3 comments, 3 participants]

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…
GitHub stats
NousResearch/hermes-agent#15118Fetched 2026-04-25 06:24:30
View on GitHub
Comments
3
Participants
3
Timeline
11
Reactions
0
Author
Timeline (top)
labeled ×4commented ×3mentioned ×2subscribed ×2

_execute_tool_calls_sequential in run_agent.py doesn't route memory-provider tools through MemoryManager, so honcho_profile, honcho_search, honcho_context, honcho_conclude (and any future memory-plugin tools) return {"error": "Unknown tool: <name>"} whenever the assistant makes a single tool call or the sequential dispatch path is otherwise selected. The concurrent path (_invoke_tool) handles this correctly, so multi-tool turns sometimes succeed — which makes the bug intermittent and easy to mistake for a config problem.

Error Message

in _execute_tool_calls_sequential, between the delegate_task branch and

the elif self.quiet_mode: fallthrough:

elif self._memory_manager and self._memory_manager.has_tool(function_name): try: function_result = self._memory_manager.handle_tool_call(function_name, function_args) except Exception as tool_error: function_result = json.dumps({"error": f"Memory tool '{function_name}' failed: {tool_error}"}) logger.error("memory_manager.handle_tool_call raised for %s: %s", function_name, tool_error, exc_info=True) tool_duration = time.time() - tool_start_time if self.quiet_mode: self._vprint(f" {_get_cute_tool_message_impl(function_name, function_args, tool_duration, result=function_result)}")

Root Cause

Two tool-dispatch paths in run_agent.py:

PathFile:lineRoutes through MemoryManager?
_invoke_tool (concurrent)~5620elif self._memory_manager and self._memory_manager.has_tool(...)
_execute_tool_calls_sequential~6012❌ no such branch — falls through to handle_function_call

Schemas get injected correctly by MemoryManager.get_all_tool_schemas() at ~L1094 and valid_tool_names contains the tool names — so the LLM advertises/calls them. Only the sequential dispatch fails.

Fix Action

Fix / Workaround

_execute_tool_calls_sequential in run_agent.py doesn't route memory-provider tools through MemoryManager, so honcho_profile, honcho_search, honcho_context, honcho_conclude (and any future memory-plugin tools) return {"error": "Unknown tool: <name>"} whenever the assistant makes a single tool call or the sequential dispatch path is otherwise selected. The concurrent path (_invoke_tool) handles this correctly, so multi-tool turns sometimes succeed — which makes the bug intermittent and easy to mistake for a config problem.

Error origin: tools/registry.py:153_execute_tool_calls_sequential falls through to handle_function_call() which consults the main tool registry; honcho tools are registered with MemoryManager, not the main registry, so dispatch fails.

Same behavior as the concurrent path: MemoryManager.has_tool() check, then MemoryManager.handle_tool_call() dispatch. The tool returns a result like {"result": "No profile facts available yet."} instead of {"error": "Unknown tool"}.

Code Example

$ hermes chat -Q --max-turns 2 -q "Call only honcho_profile and report the JSON result verbatim"
  ┊ ⚡ honcho_pr   0.0s [error]
# tool response: {"error": "Unknown tool: honcho_profile"}

---

# in _execute_tool_calls_sequential, between the delegate_task branch and
# the `elif self.quiet_mode:` fallthrough:
elif self._memory_manager and self._memory_manager.has_tool(function_name):
    try:
        function_result = self._memory_manager.handle_tool_call(function_name, function_args)
    except Exception as tool_error:
        function_result = json.dumps({"error": f"Memory tool '{function_name}' failed: {tool_error}"})
        logger.error("memory_manager.handle_tool_call raised for %s: %s", function_name, tool_error, exc_info=True)
    tool_duration = time.time() - tool_start_time
    if self.quiet_mode:
        self._vprint(f"  {_get_cute_tool_message_impl(function_name, function_args, tool_duration, result=function_result)}")
RAW_BUFFERClick to expand / collapse

Summary

_execute_tool_calls_sequential in run_agent.py doesn't route memory-provider tools through MemoryManager, so honcho_profile, honcho_search, honcho_context, honcho_conclude (and any future memory-plugin tools) return {"error": "Unknown tool: <name>"} whenever the assistant makes a single tool call or the sequential dispatch path is otherwise selected. The concurrent path (_invoke_tool) handles this correctly, so multi-tool turns sometimes succeed — which makes the bug intermittent and easy to mistake for a config problem.

Reproduction

  1. Configure Honcho per docs (hermes memory setup, or drop a valid ~/.hermes/honcho.json) with memory.provider: honcho and recall_mode: hybrid so honcho tool schemas are injected (confirmed via session JSON — schemas are present in the LLM payload).
  2. Start any gateway (Telegram, Slack) or a non-interactive CLI chat.
  3. In a turn where the assistant produces exactly one tool call, have the LLM call honcho_profile (e.g. prompt: "Call honcho_profile with no arguments").
$ hermes chat -Q --max-turns 2 -q "Call only honcho_profile and report the JSON result verbatim"
  ┊ ⚡ honcho_pr   0.0s [error]
# tool response: {"error": "Unknown tool: honcho_profile"}

Error origin: tools/registry.py:153_execute_tool_calls_sequential falls through to handle_function_call() which consults the main tool registry; honcho tools are registered with MemoryManager, not the main registry, so dispatch fails.

Expected

Same behavior as the concurrent path: MemoryManager.has_tool() check, then MemoryManager.handle_tool_call() dispatch. The tool returns a result like {"result": "No profile facts available yet."} instead of {"error": "Unknown tool"}.

Root cause

Two tool-dispatch paths in run_agent.py:

PathFile:lineRoutes through MemoryManager?
_invoke_tool (concurrent)~5620elif self._memory_manager and self._memory_manager.has_tool(...)
_execute_tool_calls_sequential~6012❌ no such branch — falls through to handle_function_call

Schemas get injected correctly by MemoryManager.get_all_tool_schemas() at ~L1094 and valid_tool_names contains the tool names — so the LLM advertises/calls them. Only the sequential dispatch fails.

Suggested patch

Add the memory_manager branch to the sequential path, mirroring _invoke_tool:

# in _execute_tool_calls_sequential, between the delegate_task branch and
# the `elif self.quiet_mode:` fallthrough:
elif self._memory_manager and self._memory_manager.has_tool(function_name):
    try:
        function_result = self._memory_manager.handle_tool_call(function_name, function_args)
    except Exception as tool_error:
        function_result = json.dumps({"error": f"Memory tool '{function_name}' failed: {tool_error}"})
        logger.error("memory_manager.handle_tool_call raised for %s: %s", function_name, tool_error, exc_info=True)
    tool_duration = time.time() - tool_start_time
    if self.quiet_mode:
        self._vprint(f"  {_get_cute_tool_message_impl(function_name, function_args, tool_duration, result=function_result)}")

Applied locally against HEAD 29c98e8f; verified fix with the same one-shot CLI repro — honcho_profile now returns {"result": "No profile facts available yet."} as expected.

Affected

  • All memory-plugin tools on single-tool-call turns (Telegram, Slack, CLI, any non-concurrent path).
  • Makes memory tools appear "unavailable in this gateway", which misleads the model into claiming memory doesn't work — users file this as a config bug.

Environment

  • hermes-agent HEAD: 29c98e8f
  • Python 3.11
  • Ubuntu 22.04 / systemd gateway
  • Memory provider: honcho (hybrid mode)

extent analysis

TL;DR

Add a branch to _execute_tool_calls_sequential in run_agent.py to route memory-provider tools through MemoryManager, mirroring the concurrent path _invoke_tool.

Guidance

  • Identify the sequential dispatch path in run_agent.py and add a check for MemoryManager.has_tool() to correctly route memory-provider tools.
  • Verify the fix by reproducing the issue with a single tool call (e.g., honcho_profile) and checking that the tool returns a result instead of an "Unknown tool" error.
  • Review the MemoryManager implementation to ensure it correctly handles tool calls and returns results.
  • Test the fix with different memory-plugin tools and gateways (e.g., Telegram, Slack, CLI) to ensure the issue is fully resolved.

Example

The suggested patch provides an example of how to add the MemoryManager branch to the sequential path:

elif self._memory_manager and self._memory_manager.has_tool(function_name):
    try:
        function_result = self._memory_manager.handle_tool_call(function_name, function_args)
    except Exception as tool_error:
        function_result = json.dumps({"error": f"Memory tool '{function_name}' failed: {tool_error}"})
        logger.error("memory_manager.handle_tool_call raised for %s: %s", function_name, tool_error, exc_info=True)

Notes

The fix assumes that the MemoryManager implementation is correct and that the issue is solely due to the missing branch in the sequential dispatch path. Additional testing and verification may be necessary to ensure the fix works as expected in all scenarios.

Recommendation

Apply the suggested patch to add the MemoryManager branch to the sequential path, as it correctly routes memory-provider tools and resolves the issue.

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 Memory-provider tools (honcho_*) fail with "Unknown tool" on single-tool-call turns [3 comments, 3 participants]