From 74efcdc1f6a7ea20f20c9cbff47955236bd97f12 Mon Sep 17 00:00:00 2001 From: rUv Date: Tue, 10 Feb 2026 16:50:09 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: rebrand/ruvflow-umbrella - Timestamp: 2026-02-10T16:50:09Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude/helpers/context-persistence-hook.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.claude/helpers/context-persistence-hook.mjs b/.claude/helpers/context-persistence-hook.mjs index 3164eb5b31..52315d3eb6 100644 --- a/.claude/helpers/context-persistence-hook.mjs +++ b/.claude/helpers/context-persistence-hook.mjs @@ -1187,11 +1187,17 @@ async function doPreCompact() { const archiveResult = await storeChunks(backend, chunks, sessionId, trigger || 'auto'); + // Auto-optimize: prune stale entries + sync to RuVector if available + const optimizeResult = await autoOptimize(backend, type); + const total = await backend.count(NAMESPACE); await backend.shutdown(); + const optimizeMsg = optimizeResult.pruned > 0 || optimizeResult.synced > 0 + ? ` Optimized: ${optimizeResult.pruned} pruned, ${optimizeResult.synced} synced to RuVector.` + : ''; process.stderr.write( - `[ContextPersistence] Archived ${archiveResult.stored} turns (${archiveResult.deduped} deduped) via ${type}. Total: ${total}\n` + `[ContextPersistence] Archived ${archiveResult.stored} turns (${archiveResult.deduped} deduped) via ${type}. Total: ${total}.${optimizeMsg}\n` ); // Exit code 0: stdout is appended as custom compact instructions