fix(agent): route memory provider tools in sequential execution path - #4785
Closed
lance0 wants to merge 1 commit into
Closed
fix(agent): route memory provider tools in sequential execution path#4785lance0 wants to merge 1 commit into
lance0 wants to merge 1 commit into
Conversation
The concurrent tool execution path (`_invoke_tool`) correctly routes memory provider tools (e.g. `fact_store`, `fact_feedback`) through `_memory_manager.handle_tool_call()` and bridges built-in memory writes to external providers via `on_memory_write()`. However, the sequential execution path (`_execute_tool_calls_sequential`) was missing both: 1. Memory provider tool dispatch — tool calls fell through to `handle_function_call()` which doesn't know about memory provider tools, causing "Unknown tool" errors. 2. Memory write bridge — built-in `memory` tool writes were not mirrored to external providers (e.g. holographic SQLite store). This adds both dispatches to the sequential path, matching the behavior already present in `_invoke_tool`. Fixes NousResearch#4781
lance0
force-pushed
the
fix/sequential-memory-provider-dispatch
branch
from
April 3, 2026 15:23
9377c1c to
d301f85
Compare
|
I think the pull request works for me. |
Author
|
Fix merged in #4803 (v0.7.0). Closing this one — glad the diagnosis helped. 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The sequential tool execution path (
_execute_tool_calls_sequential) was missing two dispatches that exist in the concurrent path (_invoke_tool):Memory provider tool routing — tools like
fact_storeandfact_feedback(from holographic, hindsight, etc.) were registered invalid_tool_namesand passed validation, but fell through tohandle_function_call()which doesn't know about memory provider tools, causing "Unknown tool" errors.Memory write bridge — when the built-in
memorytool writes to MEMORY.md/USER.md, the concurrent path notifies external memory providers viaon_memory_write()so they can mirror the data. The sequential path was missing this bridge, so holographic/hindsight/etc. never received built-in memory writes.Root Cause
_invoke_tool(used by concurrent execution) has both dispatches._execute_tool_calls_sequential(used for single tool calls and interactive tools) had its own inline dispatch that was missing them. Single tool calls are the common case for gateway/Telegram, so this affected most real-world usage.Fix
15-line addition to
_execute_tool_calls_sequential:elifbranch routing memory provider tools through_memory_manager.handle_tool_call()on_memory_write()bridge after built-inmemorytool executionBoth match the existing behavior in
_invoke_tool.Testing
valid_tool_names)fact_storetool calls (raw API test to llama-server)fact_store in valid_tool_names = True)on_memory_writebridge works: built-in memory writes now mirror to holographic SQLite store with HRR vectorsFixes #4781