Skip to content

fix: add on_memory_write bridge to sequential tool execution path - #10507

Merged
teknium1 merged 1 commit into
mainfrom
fix/memory-write-bridge-sequential
Apr 15, 2026
Merged

fix: add on_memory_write bridge to sequential tool execution path#10507
teknium1 merged 1 commit into
mainfrom
fix/memory-write-bridge-sequential

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

Summary

Fixes #10174 — The on_memory_write bridge that notifies external memory providers (ClawMem, retaindb, supermemory, holographic, etc.) was only present in the concurrent tool execution path (_invoke_tool, line ~7018). The sequential path (_execute_tool_calls_sequential, line ~7459) — which handles all single tool calls — was missing it entirely.

Since single-call memory writes are the common case (the model typically calls memory alone, not in parallel with other tools), this meant external memory providers silently missed the vast majority of memory operations.

Fix

Added the identical bridge block to the sequential path's memory handler (10 lines, exact mirror of the concurrent path):

# Bridge: notify external memory provider of built-in memory writes
if self._memory_manager and function_args.get("action") in ("add", "replace"):
    try:
        self._memory_manager.on_memory_write(
            function_args.get("action", ""),
            target,
            function_args.get("content", ""),
        )
    except Exception:
        pass

Tests

4 new tests in TestOnMemoryWriteBridge:

  • test_on_memory_write_add — fires for add actions
  • test_on_memory_write_replace — fires for replace actions
  • test_on_memory_write_remove_not_bridged — documents the add/replace-only contract
  • test_on_memory_write_tolerates_provider_failure — one bad provider doesn't block others

…0174)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes #10174
@teknium1
teknium1 merged commit af4bf50 into main Apr 15, 2026
4 of 5 checks passed
@teknium1
teknium1 deleted the fix/memory-write-bridge-sequential branch April 15, 2026 20:33
kagura-agent pushed a commit to kagura-agent/hermes-agent that referenced this pull request Apr 16, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
prmartinow pushed a commit to prmartinow/hermes-agent that referenced this pull request Aug 26, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
…usResearch#10174) (NousResearch#10507)

The on_memory_write bridge that notifies external memory providers
(ClawMem, retaindb, supermemory, etc.) of built-in memory writes was
only present in the concurrent tool execution path (_invoke_tool).
The sequential path (_execute_tool_calls_sequential) — which handles
all single tool calls, the common case — was missing it entirely.

This meant external memory providers silently missed every single-call
memory write, which is the vast majority of memory operations.

Fix: add the identical bridge block to the sequential path, right
after the memory_tool call returns.

Closes NousResearch#10174
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.

fix: on_memory_write bridge missing in _execute_tool_calls_sequential

1 participant