OpenClaw Main Fixes a Zero Disk Budget That Could Delete Session History
A P0 session-maintenance fix makes 0 disable disk cleanup, while a related reset fix prevents old model context returning after inference failure.
OpenClaw has merged a P0 correction for a destructive configuration edge case: setting session.maintenance.maxDiskBytes to numeric 0 or string "0" could make enforced maintenance delete every removable session transcript and prompt blob instead of disabling the disk budget.
PR #119422 normalizes both zero forms to “budget disabled,” matching the existing false setting. A separate P1 session-state fix, PR #116247, makes an accepted system-agent reset remain effective even when inference is unavailable.
Both fixes are on main. The source records do not establish a containing package, so do not assume an installed release includes them.
Check zero-budget configurations now
The immediate exposure is narrow but serious: an operator configured a zero byte budget, maintenance ran in enforcement mode, and removable session data was eligible for oldest-first cleanup.
The old cleanup loop received a high-water mark of zero. Because ordinary retained data could never reach total <= 0 without deletion, the apparent “off” value behaved like the most aggressive possible budget.
The merged contract now documents all three disabling forms:
false0"0"
Operator action: inspect effective configuration rather than relying on intent. If either zero form is present on a build that does not contain commit 3d669c7, change it to false before maintenance runs or stop enforced maintenance until the containing build is staged.
Do not use a tiny positive placeholder as a substitute for disabled cleanup. That creates a real, tiny budget and can still evict history.
If cleanup may already have run
Treat missing session artifacts as a data-recovery event, not as a configuration typo that can be fixed retroactively:
- stop repeated maintenance so additional eligible artifacts are not removed;
- preserve the current state directory and logs before experimenting;
- record the effective maintenance configuration and running build SHA/version;
- compare the session index, transcript paths and prompt-blob storage with known backups;
- restore only through a tested, supported process; and
- verify ownership and session routing before returning restored data to service.
Changing zero to false prevents future budget enforcement on the fixed contract. It does not reconstruct data already deleted.
The landed regression test resolves numeric zero to null budget values, receives no enforcement result and proves a transcript remains accessible. That is focused source-level proof; OpenClaw Academy did not run destructive maintenance against a production state directory.
Reset failure no longer revives old model context
PR #116247 repairs a different ordering problem in the system agent. A reset previously removed the live session and disposed its engine before writing the durable reset marker. If inference or welcome generation then failed, no boundary was recorded. The next session could seed model context from turns the operator had asked to clear—even across a restart.
The fix writes the SQLite reset marker first. If that write fails, the existing session, engine and pending approval remain untouched. Once the marker is durable, later cleanup or inference failure cannot erase the accepted boundary.
This changes model-context seeding, not historical visibility. Earlier turns remain available through chat history; they should no longer be fed back into the model after the accepted reset.
Safe acceptance tests
Use a disposable state directory with synthetic conversations:
| Contract | Proof to require |
|---|---|
maxDiskBytes: false |
Budget enforcement is disabled and artifacts remain |
maxDiskBytes: 0 |
Same result as false |
maxDiskBytes: "0" |
Same result as false |
| Small positive budget | Documented cleanup still runs; zero fix has not disabled valid budgets |
| Reset while inference works | One reset marker; next context excludes earlier turns |
| Reset while inference is unavailable | Request may fail, but the marker persists and recovered inference starts clean |
| Reset-marker write fails | Original live session and approval state remain intact |
Back up the disposable state before each case. Never prove retention behavior by pointing a candidate build at the only copy of a real session store.
Evidence and limits
The official PRs and landed commits establish the configuration normalization, documentation contract, reset ordering and focused regression coverage. They do not identify the first package containing either fix, prove restoration of previously removed files or replace deployment-specific backup testing.
Collector IDs 39842, 39758 and 39820 support the disk-budget correction. IDs 39840 and 39756 support the reset-boundary correction.
Bottom line
A zero disk budget should mean no budget, not no history. Audit zero-valued session maintenance now, protect state before upgrading, and accept a containing build only after zero leaves artifacts untouched and failed resets still create a durable model-context boundary.
THE RECEIPTS
Claims should survive the click.
Primary links used for this article are listed openly. If the evidence changes, the verification date changes with it.THE OPERATOR BRIEF