fix: respect framework-level memorySearch.enabled switch in autoRecall#141
Open
eisen0419 wants to merge 1 commit intoCortexReach:masterfrom
Open
fix: respect framework-level memorySearch.enabled switch in autoRecall#141eisen0419 wants to merge 1 commit intoCortexReach:masterfrom
eisen0419 wants to merge 1 commit intoCortexReach:masterfrom
Conversation
2 tasks
Collaborator
Review: fix: respect framework-level memorySearch.enabled switch in autoRecallVerdict: Fix-then-merge — same blocking item as #148. ✅ What's working
🔴 Blocking (same issue as #148)New test file is not wired into Fix: append to the test script in 🟡 Suggested before mergeMissing backward-compat test — the most common real-world scenario (user upgrades without adding test("issue #58: no memorySearch config → recall proceeds normally", async () => {
const outcome = await runAutoRecallScenario({}); // empty OpenClaw config
assert.ok(outcome.requests > 0);
});⚪ Non-blocking
Merge order noteThis should merge before #123 (fresh-session continuity fix) since both touch the autoRecall skip logic. #148 can go in either order — different files. Good fix. The two-level config lookup matches how OpenClaw models other agent settings (e.g. |
This was referenced Mar 10, 2026
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
Fixes #58 —
autoRecallnow respects the framework-levelmemorySearch.enabledswitch.Previously, when
agents.defaults.memorySearch.enabled = falsein OpenClaw config, the plugin still executed auto-recall because thebefore_agent_starthandler did not check the framework-level setting.Changes
resolveFrameworkMemorySearchEnabled(cfg, agentId)helper that readsmemorySearch.enabledfromapi.config, checking agent-specific override first (agents.list[].memorySearch.enabled), then falling back toagents.defaults.memorySearch.enabledbefore_agent_starthandler when frameworkmemorySearch.enabled = false, with a debug log messageagentIdresolution earlier in the handler to support the check (no behavioral change for the existing code path)Precedence
falsefalsetruetruefalseTest plan
test/issue-58-framework-memory-search.test.mjswith 3 cases:defaults.memorySearch.enabled=false→ skips recall, 0 embedding requestsdefaults=false+ agent overridetrue→ allows recalldefaults=true+ agent overridefalse→ skips recalltest/config-session-strategy-migration.test.mjsstill passes