← Back to library

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
  1. Collect baseline metrics: overflow errors, compaction retries, and session totalTokens behavior.
  2. Upgrade to a build including PR #14102 and restart gateway.
  3. Replay tool-heavy sessions to trigger long turns and potential compaction paths.
  4. Confirm overflow variants now hit retry path and compaction-failure classification is applied consistently.
  5. Check totalTokens no longer inflates from accumulated multi-call usage in one run.
Commands
openclaw gateway status
openclaw gateway restart
openclaw status
Verify

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 ↗
Visit original post