fix: complete Issue #492 protection -- per-agent exclusion + configurable serial cooldown#520
Closed
jlin53882 wants to merge 3 commits intoCortexReach:masterfrom
Closed
fix: complete Issue #492 protection -- per-agent exclusion + configurable serial cooldown#520jlin53882 wants to merge 3 commits intoCortexReach:masterfrom
jlin53882 wants to merge 3 commits intoCortexReach:masterfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Apr 4, 2026
Contributor
Author
PR #520 Changes (vs #516)1. serialCooldownMs now configurable (THIS PR)
Example in openclaw.json: 2. openclaw.plugin.json schema fixes (THIS PR)
3. Previous fixes from #516
|
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.
Problem
Issue #492: memoryReflection hooks in before_prompt_build synchronously execute
LanceDB queries on every user session, causing 30-50% of sessions to fail.
Solution
Per-agent exclusion mechanism via autoRecallExcludeAgents + configurable serial cooldown.
Changes
1. isAgentOrSessionExcluded helper
Supports exact/wildcard-prefix/temp:* patterns.
2. Fixed auto-recall before_prompt_build exclusion check
Removed ineffective agentId !== undefined check.
3. Added exclusion checks to both reflection before_prompt_build hooks
Priority 12 and 15 now have isInternal guard + exclusion check.
4. Three-layer guard on runMemoryReflection command hook
5. serialCooldownMs now configurable (THIS COMMIT)
Added to PluginConfig interface and openclaw.plugin.json schema.
Users can now adjust via openclaw.json without code changes.
6. Added internal session guard to appendSelfImprovementNote
Consistent with agent:bootstrap hook.
7. Enhanced early-return logging with sessionKey/sessionId
openclaw.json Usage
{ "memory-lancedb-pro": { "memoryReflection": { "serialCooldownMs": 60000 }, "autoRecallExcludeAgents": ["memory-distiller", "pi-", "temp:*"] } }Questions for Maintainers
Related to: #492
See also: Issue #514