Configurable context compaction threshold
Problem
Context compaction fires at a fixed point near the context window limit. When it triggers mid-conversation — especially during demos, complex debugging, or multi-step coordination — it's disruptive. The user has no warning and no control.
Proposal
Allow users to configure the compaction threshold as a percentage of context window capacity. Default could remain as-is, but a setting like:
{
"contextCompactionThreshold": 0.75
}
...would let users choose to compact earlier and more often (preserving flow) vs. later (preserving detail).
Use Case
Power users running long sessions with multiple tool calls, large file reads, and background agents hit compaction unpredictably. Earlier compaction trades some detail for continuity — a worthwhile tradeoff for sessions where flow matters more than raw context.
Analogy from the user who requested this
"Compacting conversation is like having a pressing need to urinate in the middle of a presentation."
Early compaction = a break between sections. Late compaction = interrupting the climax.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗