Improved compactor heuristics #104

Open
opened 2026-05-23 16:33:39 -04:00 by jasoncouture · 0 comments
jasoncouture commented 2026-05-23 16:33:39 -04:00 (Migrated from github.com)

Current compactor decisions are coarse. Tighten the heuristics so it triggers at the right time and preserves the right material.

Open questions to settle:

  • When to fire: pure threshold (X% of context window) vs. composite signal (threshold + idle window + turn boundary).
  • What to summarise vs. retain verbatim: tool-call/result pairs stay together (covered by #11), recent user turns stay raw, system / instruction turns stay raw, oldest free-form turns collapse first.
  • How to summarise: model-generated condensed summary vs. structural condensation (drop low-signal entries) vs. mix.
  • How aggressively: target post-compaction utilization (e.g. "return to 40% window") instead of a fixed ratio.

Depends on accurate token usage (sibling) — heuristics that key on tokens need real counts, not estimates. Pairs with #11 (tool-pair preservation), compactor tool (sibling).

Current compactor decisions are coarse. Tighten the heuristics so it triggers at the right time and preserves the right material. Open questions to settle: - When to fire: pure threshold (X% of context window) vs. composite signal (threshold + idle window + turn boundary). - What to summarise vs. retain verbatim: tool-call/result pairs stay together (covered by #11), recent user turns stay raw, system / instruction turns stay raw, oldest free-form turns collapse first. - How to summarise: model-generated condensed summary vs. structural condensation (drop low-signal entries) vs. mix. - How aggressively: target post-compaction utilization (e.g. \"return to 40% window\") instead of a fixed ratio. Depends on accurate token usage (sibling) — heuristics that key on tokens need real counts, not estimates. Pairs with #11 (tool-pair preservation), compactor tool (sibling).
Sign in to join this conversation.
No description provided.