Checkpoint: File edits

Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:35:10Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rUvandClaude Opus 4.5 committed 2026-02-10 16:35:10 +00:00
1 parent 3a708c1d96
commit caa8a4764c
1 file changed
+17 -2
+17 -2
View File
@@ -976,14 +976,29 @@ async function doPreCompact() {
const { backend, type } = await resolveBackend();
const result = await storeChunks(backend, chunks, sessionId, trigger || 'auto');
const archiveResult = await storeChunks(backend, chunks, sessionId, trigger || 'auto');
const total = await backend.count(NAMESPACE);
await backend.shutdown();
process.stderr.write(
`[ContextPersistence] Archived ${result.stored} turns (${result.deduped} deduped) via ${type}. Total: ${total}\n`
`[ContextPersistence] Archived ${archiveResult.stored} turns (${archiveResult.deduped} deduped) via ${type}. Total: ${total}\n`
);
// Exit code 0: stdout is appended as custom compact instructions
// This guides Claude on what to preserve in the compaction summary
const instructions = buildCompactInstructions(chunks, sessionId, archiveResult);
process.stdout.write(instructions);
// Exit code 2 blocks compaction entirely (opt-in via env var)
// Use case: when proactive archiving has already captured everything
// and the user prefers to manually trigger compaction
if (BLOCK_COMPACTION && trigger === 'auto') {
process.stderr.write(
`[ContextPersistence] BLOCKING auto-compaction (CLAUDE_FLOW_BLOCK_COMPACTION=true). All ${chunks.length} turns archived.\n`
);
process.exit(2);
}
}
async function doSessionStart() {