compact-budget-guarantee
OUT premise
`compact()` output estimated token count never exceeds the `budget` parameter; every line is gated by `_over_budget` before appending.
Summary
The system's context compaction function is designed to respect a hard token budget — it checks before adding each line and should never produce output larger than the budget allows. This matters because exceeding the budget could cause downstream failures when the compacted context is fed back into a limited context window.
Details
| Source | entries/2026/04/24/reasons_lib-compact.md |