Repository navigation
feat(openclaw): schedule cleaner execution on host requests - #79
Merged
trancefornow merged 2 commits intoSep 20, 2026
Merged
trancefornow merged 2 commits into
trancefornow merged 2 commits into
Conversation
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.
Summary
Upgrade the OpenClaw Context Cleaner from immediate canonical rewriting to scheduled, request-time execution.
Selecting tasks now creates a durable
scheduledreceipt without modifying the canonical transcript. The next ordinary OpenClaw request claims the scheduled plan, performs one canonical rewrite, and records the terminal receipt with real revision and operation evidence.This completes the OpenClaw native-command and external CLI workflow required by the latest Context Cleaner acceptance plan.
What changed
Scheduled Cleaner execution
The new lifecycle is:
OpenClaw Cleaner architecture
Replace the previous monolithic Cleaner bridge with focused modules:
snapshot.tscapabilities.tsscheduler.tsruntime.tsservice.tssession-lock.tssnapshot.tsRequest-time execution
staleterminal receipt instead of applying obsolete targets.Native OpenClaw commands
Preserve the existing native command surface:
The native command continues to provide:
Selection now returns
scheduledand explicitly tells the user that cleaning will run on the next ordinary OpenClaw request.External CLI and TTY selector
Keep raw-key interaction in the external CLI:
The terminal selector supports:
qto cancelOpenClaw native commands and the external CLI share the same plans, schedules, and receipts.
The native slash command intentionally does not take over OpenClaw TUI keyboard input.
Recovery and concurrency safety
Output improvements
Apply timing: next Host requestfor scheduled receipts.chars_onlyunits in receipts, including zero-value receipts.Manual acceptance
Verified against a real OpenClaw installation with TokenPilot configured as the active Context Engine.
Native scheduled execution
scheduled.Applied savingsremainednot applied.--statusand confirmed it did not trigger execution.applied.Observed example:
After the next ordinary request:
Cross-entry workflow
/lightrsi clean --status.Observed example:
After the next ordinary request:
Interactive selector
Verified in a real WSL terminal:
qcancelled without scheduling a rewrite.Cancellation and protection
q./lightrsi clean --cancel.cancelled_by_user.clean_selection_task_protected.analyzed.Automated verification
Notes
chars_onlywhen no trustworthy task-level token meter exists.