fix(sessions): preserve durable conversation entries

This commit is contained in:
Peter Steinberger
2026-05-02 06:30:36 +01:00
parent 811d90778f
commit de0d484236
9 changed files with 283 additions and 8 deletions

View File

@@ -81,6 +81,11 @@ Session persistence has automatic maintenance controls (`session.maintenance`) f
Normal Gateway writes batch `maxEntries` cleanup for production-sized caps, so a store may briefly exceed the configured cap before the next high-water cleanup rewrites it back down. Session store reads do not prune or cap entries during Gateway startup; use writes or `openclaw sessions cleanup --enforce` for cleanup. `openclaw sessions cleanup --enforce` still applies the configured cap immediately.
Maintenance keeps durable external conversation pointers such as group sessions
and thread-scoped chat sessions, but synthetic runtime entries for cron, hooks,
heartbeat, ACP, and sub-agents can still be removed when they exceed the
configured age, count, or disk budget.
OpenClaw no longer creates automatic `sessions.json.bak.*` rotation backups during Gateway writes. The legacy `session.maintenance.rotateBytes` key is ignored and `openclaw doctor --fix` removes it from older configs.
Enforcement order for disk budget cleanup (`mode: "enforce"`):