Skip to main content

COMPACTION_BUFFER

Constant COMPACTION_BUFFER 

Source
pub const COMPACTION_BUFFER: usize = 20_000;
Expand description

Token headroom reserved between context limit and compaction trigger.

This ensures the compaction LLM call itself (prompt + response) fits without overflowing. OpenCode uses 20,000 tokens.