fix: preserve context engine safeguard compaction

This commit is contained in:
Peter Steinberger
2026-04-25 02:30:17 +01:00
parent a9a308becd
commit 41f9768cd8
7 changed files with 134 additions and 27 deletions

View File

@@ -210,7 +210,10 @@ enabled for the run:
- `true` — the engine owns compaction behavior. OpenClaw disables Pi's built-in
auto-compaction for that run, and the engine's `compact()` implementation is
responsible for `/compact`, overflow recovery compaction, and any proactive
compaction it wants to do in `afterTurn()`.
compaction it wants to do in `afterTurn()`. OpenClaw may still run the
pre-prompt overflow safeguard; when it predicts the full transcript will
overflow, the recovery path calls the active engine's `compact()` before
submitting another prompt.
- `false` or unset — Pi's built-in auto-compaction may still run during prompt
execution, but the active engine's `compact()` method is still called for
`/compact` and overflow recovery.