fix(active-memory): skip sub-agent gracefully when no memory tools registered (#77506)#77515
Conversation
|
@clawsweeper review |
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Source inspection shows current main can route active-memory's runtime memory tool allowlist into the embedded runner with no registered memory tools, and the linked issue provides the concrete gateway error shape. Next step before merge Security Review detailsBest possible solution: Have a maintainer review and merge the current PR once exact-head CI is fully green, keeping the fix local to active-memory and leaving memory tool ownership in the memory plugins. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main can route active-memory's runtime memory tool allowlist into the embedded runner with no registered memory tools, and the linked issue provides the concrete gateway error shape. Is this the best way to solve the issue? Yes. Returning the normal empty recall result for only the missing registered memory-tools guard error is the narrow maintainable fix, and the current PR head preserves tools-disabled, unsupported-model, and abort diagnostics. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5005f5b22e10. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper automerge |
|
🦞🔧 Source: I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow fix. Automerge progress:
|
fa779e2 to
e6ea291
Compare
…gistered (openclaw#77506) When memory-core and memory-lancedb are both absent, the embedded memory sub-agent would throw 'No callable tools remain after resolving explicit tool allowlist', which propagated as a noisy warning through the before_prompt_build hook. Catch this specific error in runActiveMemorySubAgent and return an empty NONE result so the gateway log stays clean and the sub-agent run is skipped without disrupting the parent session.
|
@clawsweeper stop |
|
🦞✅ I added |
e6ea291 to
f383456
Compare
…gistered (openclaw#77506) (openclaw#77515) * fix(active-memory): skip sub-agent gracefully when no memory tools registered (openclaw#77506) When memory-core and memory-lancedb are both absent, the embedded memory sub-agent would throw 'No callable tools remain after resolving explicit tool allowlist', which propagated as a noisy warning through the before_prompt_build hook. Catch this specific error in runActiveMemorySubAgent and return an empty NONE result so the gateway log stays clean and the sub-agent run is skipped without disrupting the parent session. * fix(active-memory): skip missing memory-tool subagent runs * fix(active-memory): match inherited missing memory tool errors * fix(active-memory): preserve policy-filtered memory errors --------- Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Tak Hoffman <[email protected]>
…gistered (openclaw#77506) (openclaw#77515) * fix(active-memory): skip sub-agent gracefully when no memory tools registered (openclaw#77506) When memory-core and memory-lancedb are both absent, the embedded memory sub-agent would throw 'No callable tools remain after resolving explicit tool allowlist', which propagated as a noisy warning through the before_prompt_build hook. Catch this specific error in runActiveMemorySubAgent and return an empty NONE result so the gateway log stays clean and the sub-agent run is skipped without disrupting the parent session. * fix(active-memory): skip missing memory-tool subagent runs * fix(active-memory): match inherited missing memory tool errors * fix(active-memory): preserve policy-filtered memory errors --------- Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Tak Hoffman <[email protected]>
…gistered (openclaw#77506) (openclaw#77515) * fix(active-memory): skip sub-agent gracefully when no memory tools registered (openclaw#77506) When memory-core and memory-lancedb are both absent, the embedded memory sub-agent would throw 'No callable tools remain after resolving explicit tool allowlist', which propagated as a noisy warning through the before_prompt_build hook. Catch this specific error in runActiveMemorySubAgent and return an empty NONE result so the gateway log stays clean and the sub-agent run is skipped without disrupting the parent session. * fix(active-memory): skip missing memory-tool subagent runs * fix(active-memory): match inherited missing memory tool errors * fix(active-memory): preserve policy-filtered memory errors --------- Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Tak Hoffman <[email protected]>
…gistered (openclaw#77506) (openclaw#77515) * fix(active-memory): skip sub-agent gracefully when no memory tools registered (openclaw#77506) When memory-core and memory-lancedb are both absent, the embedded memory sub-agent would throw 'No callable tools remain after resolving explicit tool allowlist', which propagated as a noisy warning through the before_prompt_build hook. Catch this specific error in runActiveMemorySubAgent and return an empty NONE result so the gateway log stays clean and the sub-agent run is skipped without disrupting the parent session. * fix(active-memory): skip missing memory-tool subagent runs * fix(active-memory): match inherited missing memory tool errors * fix(active-memory): preserve policy-filtered memory errors --------- Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Tak Hoffman <[email protected]>
…gistered (openclaw#77506) (openclaw#77515) * fix(active-memory): skip sub-agent gracefully when no memory tools registered (openclaw#77506) When memory-core and memory-lancedb are both absent, the embedded memory sub-agent would throw 'No callable tools remain after resolving explicit tool allowlist', which propagated as a noisy warning through the before_prompt_build hook. Catch this specific error in runActiveMemorySubAgent and return an empty NONE result so the gateway log stays clean and the sub-agent run is skipped without disrupting the parent session. * fix(active-memory): skip missing memory-tool subagent runs * fix(active-memory): match inherited missing memory tool errors * fix(active-memory): preserve policy-filtered memory errors --------- Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Tak Hoffman <[email protected]>
Fixes #77506.
When
active-memoryis enabled but no memory plugin is loaded (memory-coreormemory-lancedb), the embedded memory sub-agent attempts to run withtoolsAllow: ["memory_recall", "memory_search", "memory_get"]. If none of those tools are registered, the tool-allowlist guard throws:This error is caught by the outer
before_prompt_buildhook and logged as a confusing warning. The user's reported session wipe is likely a separate issue, but the allowlist error is real noise.Fix
In
runActiveMemorySubAgent's catch block, detect the "No callable tools remain" error from the tool-allowlist guard and return{ rawReply: "NONE" }— the same empty result the sub-agent returns when it finds no relevant memories — instead of rethrowing. This silences the confusing error and lets the gateway log stay clean.No behavior change when memory plugins are loaded:
memory-coreregistered →memory_search+memory_getcallable → sub-agent runs normallymemory-lancedbregistered → all three callable → sub-agent usesmemory_recallwhen appropriate (as the system prompt already instructs)Changes
extensions/active-memory/index.ts: catch the "No callable tools remain" error and return empty result with adebug-level logCHANGELOG.md: entry under FixesTest