Files
BrowserOS/packages
Nikhil a824078f6d fix: compaction config for small context windows (≤32K) (#466)
* fix: compaction config for small context windows (≤32K)

Raise COMPACTION_SMALL_CONTEXT_WINDOW from 16K to 32K so models like
Haiku 4.5 (30K context) use proportional 50% reserve instead of the
fixed 20K reserve. Also scale fixedOverhead for small contexts (capped
at 40% of context window) to prevent the doom loop where overhead alone
triggers compaction on every step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add compaction tuning guidance to limits constants

Explain the relationship between SMALL_CONTEXT_WINDOW and
FIXED_OVERHEAD so devs know the 24K minimum constraint when
tweaking these values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 18:12:20 -07:00
..