feat(compaction): optional memory flush before manual /compact#14021
Open
phenomenoner wants to merge 1 commit intoopenclaw:mainfrom
Open
feat(compaction): optional memory flush before manual /compact#14021phenomenoner wants to merge 1 commit intoopenclaw:mainfrom
phenomenoner wants to merge 1 commit intoopenclaw:mainfrom
Conversation
697d48c to
57c54be
Compare
TWFBusiness
added a commit
to TWFBusiness/openclaw-tw
that referenced
this pull request
Feb 11, 2026
- openclaw#14019: prevent cron jobs from skipping execution (nextRunAtMs regression) - openclaw#13931: drain active agent turns before gateway restart - openclaw#14023: filter skills watcher file types to prevent FD exhaustion - openclaw#13983: use requested agentId for isolated cron job auth resolution - openclaw#13956: fix Grok web search returning empty content (xAI Responses API) - openclaw#14018: auto-remind AI to check workspace context files on session reset - openclaw#13960: preserve structured config validation errors in UI - openclaw#13951: improve provider error logging in gateway logs - openclaw#14021: optional memory flush before manual /compact command Co-Authored-By: Claude Opus 4.6 <[email protected]>
57c54be to
632e7f8
Compare
632e7f8 to
5f514ba
Compare
5f514ba to
96eba68
Compare
96eba68 to
62f8663
Compare
62f8663 to
537ac86
Compare
537ac86 to
2d21f47
Compare
bfc1ccb to
f92900f
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an optional pre-compaction memory flush turn before manual /compact.\n\n- New config: agents.defaults.compaction.memoryFlush.onManualCompact (default: false)\n- When enabled, /compact runs a memory flush agent turn first, then compacts\n- Skips flush when workspace is read-only (sandbox workspaceAccess != rw) or when using CLI providers\n- Fail-open: if the flush run throws, compaction still proceeds\n\nDocs: updated configuration reference (EN + zh-CN).\nTests: added e2e coverage to ensure flush runs before compact when enabled.
Greptile Overview
Greptile Summary
This PR adds an optional pre-compaction memory flush feature for manual
/compactcommands. Whenagents.defaults.compaction.memoryFlush.onManualCompactis enabled (default: false), the system runs a memory flush agent turn before compacting the session, allowing the agent to store durable memories to disk. The feature intelligently skips the flush when the workspace is read-only or when using CLI providers (which don't support tool runs), and follows a fail-open pattern where compaction proceeds even if the flush fails.Key changes:
onManualCompactconfig field toAgentCompactionMemoryFlushConfigwith proper TypeScript types and Zod validationcommands-compact.tsto conditionally runrunEmbeddedPiAgentbefore compactionrwonly) and CLI provider detectionConfidence Score: 5/5
(2/5) Greptile learns from your feedback when you react with thumbs up/down!