Skip to content

fix: add memory provider dispatch to sequential tool execution path#4780

Closed
ukint-vs wants to merge 1 commit intoNousResearch:mainfrom
ukint-vs:fix/memory-provider-sequential-dispatch
Closed

fix: add memory provider dispatch to sequential tool execution path#4780
ukint-vs wants to merge 1 commit intoNousResearch:mainfrom
ukint-vs:fix/memory-provider-sequential-dispatch

Conversation

@ukint-vs
Copy link
Copy Markdown

@ukint-vs ukint-vs commented Apr 3, 2026

Summary

  • External memory provider tools (mem0_profile, mem0_search, mem0_conclude) were returning "Unknown tool" errors when called through the gateway (Telegram, Discord, etc.)
  • Root cause: _execute_tool_calls_sequential() was missing the _memory_manager.has_tool() check that exists in the concurrent path (_invoke_tool())
  • Single tool calls in quiet_mode (always used by the gateway) take the sequential path, so memory provider tools were completely broken on all gateway platforms

Fix

Added the memory manager dispatch (5 lines) to the sequential tool execution path, matching what already exists in _invoke_tool() at line ~5620.

Test plan

  • Verified mem0_profile, mem0_search, mem0_conclude work via Telegram gateway after fix
  • Confirmed concurrent path (multi-tool calls) was already working
  • No changes to existing tool dispatch behavior — only adds a missing elif branch

🤖 Generated with Claude Code

The sequential tool dispatch in `_execute_tool_calls_sequential()` was
missing the memory manager check that exists in the concurrent path
(`_invoke_tool()`). This caused external memory provider tools (e.g.
mem0_profile, mem0_search, mem0_conclude) to fall through to the
registry, which returned "Unknown tool" errors.

Single tool calls in quiet_mode (used by the gateway for Telegram/Discord)
always take the sequential path, so memory provider tools were completely
broken on all gateway platforms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@teknium1
Copy link
Copy Markdown
Contributor

teknium1 commented Apr 4, 2026

Already fixed on main via PR #4803 (merged). The memory provider dispatch block in _execute_tool_calls_sequential is identical to this fix. Thanks for catching the same issue!

@teknium1 teknium1 closed this Apr 4, 2026
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.

2 participants