mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-01 05:43:35 +00:00
* fix(agents): skip pre-prompt precheck when context engine owns compaction When a context engine advertises ownsCompaction=true (e.g. lossless-claw), skip the pre-prompt preemptive overflow precheck entirely. The engine already manages the context budget through assemble() and its own compaction lifecycle — the built-in precheck is redundant and causes false-positive overflow errors for CJK-heavy sessions due to its conservative token estimation formula. Safety is preserved: if the model's actual context limit is exceeded, the model API returns an error that the outer overflow-compaction retry loop handles normally. * fix(agents): assert non-null context engine in precheck skip log * test(context-engine): cover owning precheck contract * fix(agents): preserve precheck after context assembly failure --------- Co-authored-by: Josh Lehman <josh@martian.engineering>