You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tighten Codex auto-recall filtering so vague prompts and internal OpenClaw/Codex hook noise do not inject unrelated memory.
Add async commit task polling for Codex PreCompact and SessionStart commits, so hook output reports the actual extraction count instead of the immediate accepted response.
Document the new commit poll tuning knobs and add a live auto-recall probe script.
The sanitizeCapturedText function is duplicated in both auto-capture.mjs and pre-compact-capture.mjs. This creates maintenance overhead and risks divergent behavior if the function is updated in one place but not the other.
function sanitizeCapturedText(text) {
let out = String(text || "");
if (/^\s*You are running as a subagent\b/i.test(out)) return "";
out = out
.replace(/<relevant-memories>[\s\S]*?<\/relevant-memories>/gi, "")
.replace(/<<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>>[\s\S]*?<<<END_OPENCLAW_INTERNAL_CONTEXT>>>/g, "")
.replace(/Conversation context \(untrusted metadata\):\s*```json[\s\S]*?```\s*/gi, "")
.replace(/\[Inter-session message][\s\S]*?(?=\n\[[a-z]+]:|\n?$)/gi, "")
.replace(/Full hook output saved to:\s*\S+/gi, "")
.trim();
if (/^(?:\[user]:\s*)*$/i.test(out)) return "";
return out;
}
The sanitizeCapturedText function is duplicated in both auto-capture.mjs and pre-compact-capture.mjs. This creates maintenance overhead and risks divergent behavior if the function is updated in one place but not the other.
function sanitizeCapturedText(text) {
let out = String(text || "");
if (/^\s*You are running as a subagent\b/i.test(out)) return "";
out = out
.replace(/<relevant-memories>[\s\S]*?<\/relevant-memories>/gi, "")
.replace(/<<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>>[\s\S]*?<<<END_OPENCLAW_INTERNAL_CONTEXT>>>/g, "")
.replace(/Conversation context \(untrusted metadata\):\s*```json[\s\S]*?```\s*/gi, "")
.replace(/\[Inter-session message][\s\S]*?(?=\n\[[a-z]+]:|\n?$)/gi, "")
.replace(/Full hook output saved to:\s*\S+/gi, "")
.trim();
if (/^(?:\[user]:\s*)*$/i.test(out)) return "";
return out;
}
Add a timeout to the spawned child process in runAutoRecall to prevent hanging indefinitely. Use a timeout (e.g., 30 seconds) and kill the child process if it exceeds the timeout.
Why: Adding a timeout prevents the probe from hanging indefinitely, improving robustness. This is a useful enhancement but not a critical bug fix, so it receives a moderate score.
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
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
Verification