← Back to PRs

#14128: config: add readable durable/off mode for pre-compaction memory flush

by vpesh open 2026-02-11 14:53 View on GitHub →
docs gateway stale
## Summary - add a readable `agents.defaults.compaction.memoryFlush.mode` switch with `durable | off` - keep legacy `memoryFlush.enabled` behavior for backward compatibility - make `mode` take precedence over `enabled` when both are set - document the new switch in compaction/configuration docs and update examples ## Why `memoryFlush.enabled` works but is hard to read in configs and discussions. A named mode makes intent clearer while keeping old configs working. ## Testing - `pnpm vitest run src/auto-reply/reply/memory-flush.test.ts src/config/config.compaction-settings.test.ts` - `pnpm check` - `pnpm build` - local agent smoke run (`openclaw agent --local --agent main ...`) after rebase on latest `origin/main` <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> Added a readable `mode` field (`durable` | `off`) to `agents.defaults.compaction.memoryFlush` configuration, replacing the less clear `enabled` boolean while maintaining full backward compatibility. When `mode` is set, it takes precedence over the legacy `enabled` field. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The implementation is clean, well-tested, and maintains complete backward compatibility. The logic correctly prioritizes the new `mode` field over the legacy `enabled` field. Tests verify both the new behavior and backward compatibility. Documentation is comprehensive with only minor wording improvements suggested. - No files require special attention <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs