overflow 检测与 compaction 重试补强,避免假性 200k/200k(PR #14102)
针对工具密集回合的上下文统计膨胀和溢出识别漏判:引入 likely-overflow 识别并用最新调用 prompt token 做会话上下文计量。
GITHUBDiscovered 2026-02-13Author vpesh
Prerequisites
- You have logs showing context overflow variants (not always exact same error text).
- Load test or replay traffic is available for post-upgrade validation.
Steps
- Collect baseline metrics: overflow errors, compaction retries, and session totalTokens behavior.
- Upgrade to a build including PR #14102 and restart gateway.
- Replay tool-heavy sessions to trigger long turns and potential compaction paths.
- Confirm overflow variants now hit retry path and compaction-failure classification is applied consistently.
- Check totalTokens no longer inflates from accumulated multi-call usage in one run.
Commands
openclaw gateway statusopenclaw gateway restartopenclaw statusVerify
Overflow retries trigger more reliably on variant errors, and context display remains close to real prompt size.
Caveats
- If provider errors are heavily rewritten by proxies, likely-overflow matching may still miss edge strings(需验证)。
- Compaction retry improves resilience but does not replace prompt-budget discipline for very large workflows.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗