Skip to content

fix: route memory provider tools in sequential execution path#4803

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-70885193
Apr 3, 2026
Merged

fix: route memory provider tools in sequential execution path#4803
teknium1 merged 1 commit into
mainfrom
hermes/hermes-70885193

Conversation

@teknium1

@teknium1 teknium1 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Memory provider tools (like hindsight_retain, hindsight_recall, honcho_search, etc.) were advertised to the model via tool schemas but failed with "Unknown tool" at execution time. Every memory provider plugin (Honcho, Hindsight, Holographic, Mem0, etc.) was affected.

Root Cause

Two tool dispatch paths exist in run_agent.py:

  1. _invoke_tool() (concurrent path) — correctly checks self._memory_manager.has_tool(function_name) before falling through to the registry
  2. _execute_tool_calls_sequential() (sequential path) — was missing this check entirely

Since sequential is the default for single tool calls, memory provider tools always went through handle_function_call()registry.dispatch(), which returned {"error": "Unknown tool: hindsight_retain"} because memory provider tools are not registered in the tool registry — they live in MemoryManager._tool_to_provider.

Fix

Add the memory_manager.has_tool() dispatch check between the delegate_task handler and the quiet_mode fallthrough in the sequential path, with proper spinner/display handling matching the existing pattern.

Testing

  • ✅ 727 agent tests pass (0 new failures)
  • ✅ 4090 tools+gateway tests pass (0 new failures)
  • ✅ 867 CLI tests pass (0 new failures)
  • ✅ E2E verification: confirmed registry returns "Unknown tool" for memory provider tools, MemoryManager routes correctly, and both execution paths now have the dispatch check

Reported by

KiBenderOP — tested with Honcho, Hindsight, and Holographic providers.

Memory provider tools (hindsight_retain, honcho_search, etc.) were
advertised to the model via tool schemas but failed with 'Unknown tool'
at execution time. The concurrent path (_invoke_tool) correctly checks
self._memory_manager.has_tool() before falling through to the registry,
but the sequential path (_execute_tool_calls_sequential) was never
updated with this check. Since sequential is the default for single
tool calls, memory provider tools always hit the registry dispatcher
which returns 'Unknown tool' because they're not registered there.

Add the memory_manager dispatch check between the delegate_task handler
and the quiet_mode fallthrough in the sequential path, with proper
spinner/display handling to match the existing pattern.

Reported by KiBenderOP — all memory providers affected (Honcho,
Hindsight, Holographic, etc.).
@teknium1 teknium1 merged commit e492420 into main Apr 3, 2026
5 of 6 checks passed
jooray added a commit to jooray/hermes-agent that referenced this pull request Apr 3, 2026
* upstream/main: (38 commits)
  fix(memory): Fix ByteRover plugin - run brv query synchronously before LLM call
  chore: release v0.7.0 (2026.4.3) (NousResearch#4812)
  fix: route memory provider tools in sequential execution path (NousResearch#4803)
  fix: persist API server sessions to shared SessionDB (state.db) (NousResearch#4802)
  fix(discord): register /approve and /deny slash commands, wire up button-based approval UI (NousResearch#4800)
  fix: respect per-platform disabled skills in Telegram menu and gateway dispatch (NousResearch#4799)
  fix(gateway): route /approve and /deny through running-agent guard (NousResearch#4798)
  docs: add community FAQ entries — multi-model workflows, WhatsApp binding, verbose control, skills config, thread sessions, migration, install troubleshooting (NousResearch#4797)
  fix: handle None mcp_servers in _get_platform_tools()
  fix(mcp): stability fix pack — reload timeout, shutdown cleanup, event loop handler, OAuth non-blocking (NousResearch#4757)
  fix: prevent compression death spiral from API disconnects (NousResearch#2153) (NousResearch#4750)
  fix: handle Anthropic Sonnet long-context tier 429 by reducing to 200k (NousResearch#4747)
  fix: correct qwen3.6-plus model slug
  fix: handle Anthropic long-context tier 429 by reducing to 200k
  docs(acp): fix zed config
  fix: use get_hermes_home(), consolidate git_cmd, update tests
  Add fork detection and upstream sync to hermes update
  fix(update): handle conflicted git index during hermes update (NousResearch#4735)
  fix: remove redundant restart message from update launchd path
  fix(update): avoid launchd restart race on macOS
  ...
nils010485 pushed a commit to nils010485/hermes-agent that referenced this pull request Apr 4, 2026
…api_url

The Hindsight() constructor expects base_url as the first positional
argument, but _make_client() passed api_key in that position. This made
cloud mode completely non-functional.

Also adds configurable api_url (via config, HINDSIGHT_API_URL env var,
or setup wizard) so self-hosted Docker instances can be used instead of
the default cloud endpoint. Timeout increased from 30s to 120s.

Fixes the remaining issue from PR NousResearch#4762 (sequential dispatch was
already fixed by PR NousResearch#4803).
zebster-cmd added a commit to zebster-cmd/hermes-agent that referenced this pull request Apr 4, 2026
Resolved conflicts:
- plugins/memory/openviking/__init__.py: kept our is_available() .env
  fallback, adopted upstream env-var defaults for account/user
- plugins/memory/byterover/__init__.py: adopted upstream synchronous
  prefetch (replaces threaded queue_prefetch pattern)
- hermes_cli/main.py: adopted upstream find_gateway_pids() approach
  for multi-gateway restart (replaces per-service-type restart block)
- hermes_cli/__init__.py + pyproject.toml: version 0.7.0 (auto-resolved)

Key upstream features:
- Memory provider tools routed in sequential execution (NousResearch#4803)
- Clean user message for memory operations (NousResearch#5099)
- Duplicate message prevention (gateway dedup) (NousResearch#4878)
- O(n^2) regex backtracking fix (831067c)
- OpenViking tenant-scoping headers (NousResearch#4825)
@bkutasi bkutasi mentioned this pull request Apr 14, 2026
10 tasks
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…search#4803)

Memory provider tools (hindsight_retain, honcho_search, etc.) were
advertised to the model via tool schemas but failed with 'Unknown tool'
at execution time. The concurrent path (_invoke_tool) correctly checks
self._memory_manager.has_tool() before falling through to the registry,
but the sequential path (_execute_tool_calls_sequential) was never
updated with this check. Since sequential is the default for single
tool calls, memory provider tools always hit the registry dispatcher
which returns 'Unknown tool' because they're not registered there.

Add the memory_manager dispatch check between the delegate_task handler
and the quiet_mode fallthrough in the sequential path, with proper
spinner/display handling to match the existing pattern.

Reported by KiBenderOP — all memory providers affected (Honcho,
Hindsight, Holographic, etc.).
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…search#4803)

Memory provider tools (hindsight_retain, honcho_search, etc.) were
advertised to the model via tool schemas but failed with 'Unknown tool'
at execution time. The concurrent path (_invoke_tool) correctly checks
self._memory_manager.has_tool() before falling through to the registry,
but the sequential path (_execute_tool_calls_sequential) was never
updated with this check. Since sequential is the default for single
tool calls, memory provider tools always hit the registry dispatcher
which returns 'Unknown tool' because they're not registered there.

Add the memory_manager dispatch check between the delegate_task handler
and the quiet_mode fallthrough in the sequential path, with proper
spinner/display handling to match the existing pattern.

Reported by KiBenderOP — all memory providers affected (Honcho,
Hindsight, Holographic, etc.).
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…search#4803)

Memory provider tools (hindsight_retain, honcho_search, etc.) were
advertised to the model via tool schemas but failed with 'Unknown tool'
at execution time. The concurrent path (_invoke_tool) correctly checks
self._memory_manager.has_tool() before falling through to the registry,
but the sequential path (_execute_tool_calls_sequential) was never
updated with this check. Since sequential is the default for single
tool calls, memory provider tools always hit the registry dispatcher
which returns 'Unknown tool' because they're not registered there.

Add the memory_manager dispatch check between the delegate_task handler
and the quiet_mode fallthrough in the sequential path, with proper
spinner/display handling to match the existing pattern.

Reported by KiBenderOP — all memory providers affected (Honcho,
Hindsight, Holographic, etc.).
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…search#4803)

Memory provider tools (hindsight_retain, honcho_search, etc.) were
advertised to the model via tool schemas but failed with 'Unknown tool'
at execution time. The concurrent path (_invoke_tool) correctly checks
self._memory_manager.has_tool() before falling through to the registry,
but the sequential path (_execute_tool_calls_sequential) was never
updated with this check. Since sequential is the default for single
tool calls, memory provider tools always hit the registry dispatcher
which returns 'Unknown tool' because they're not registered there.

Add the memory_manager dispatch check between the delegate_task handler
and the quiet_mode fallthrough in the sequential path, with proper
spinner/display handling to match the existing pattern.

Reported by KiBenderOP — all memory providers affected (Honcho,
Hindsight, Holographic, etc.).
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…search#4803)

Memory provider tools (hindsight_retain, honcho_search, etc.) were
advertised to the model via tool schemas but failed with 'Unknown tool'
at execution time. The concurrent path (_invoke_tool) correctly checks
self._memory_manager.has_tool() before falling through to the registry,
but the sequential path (_execute_tool_calls_sequential) was never
updated with this check. Since sequential is the default for single
tool calls, memory provider tools always hit the registry dispatcher
which returns 'Unknown tool' because they're not registered there.

Add the memory_manager dispatch check between the delegate_task handler
and the quiet_mode fallthrough in the sequential path, with proper
spinner/display handling to match the existing pattern.

Reported by KiBenderOP — all memory providers affected (Honcho,
Hindsight, Holographic, etc.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant