Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv197f0ee1af69
diff --git a/.claude/helpers/context-persistence-hook.mjs b/.claude/helpers/context-persistence-hook.mjs
index fbde412874..4f6855f1f6 100644
--- a/.claude/helpers/context-persistence-hook.mjs
+++ b/.claude/helpers/context-persistence-hook.mjs
@@ -1213,8 +1213,10 @@ function estimateContextTokens(transcriptPath) {
const parsed = JSON.parse(lines[i]);
// Check for compact_boundary — this has real token count
+ // SDK uses camelCase: compactMetadata.preTokens (not snake_case)
if (parsed.type === 'system' && parsed.subtype === 'compact_boundary') {
- lastPreTokens = parsed.compact_metadata?.pre_tokens || 0;
+ lastPreTokens = parsed.compactMetadata?.preTokens
+ || parsed.compact_metadata?.pre_tokens || 0;
lastBoundaryLine = i;
totalChars = 0; // Reset — post-compaction content is what matters
turns = 0;