And itโs not the only option even if it is the newest. Will be experimenting more.
Context compaction with GLiNER2.5. โจ
Completely local (open weight) with span extraction for verbatim context preservation.
For each completed tool interaction, GLiNER2.5 sees:
โข Current goal
โข Nearby conversation
โข Tool name and arguments
โข Original result
It then chooses to:
โข Keep the full interaction
โข Keep exact evidence
โข Keep only the rerunnable call
โข Drop an irrelevant or superseded pair
Deterministic safeguards preserve recent messages and mutations, keep uncertain interactions in full, reject invalid spans, and maintain tool-call/result pairing.
When a 96,000-character log contains only a few useful failure lines, the compactor copies those exact spans and removes the surrounding noise. User and assistant messages remain unchanged.
Everything runs in a local Python worker after the checkpoint download. Before replacing history, it validates offsets, confidence values, conversation text, and tool pairing. Failures fall back atomically.
Shadow mode is enabled by default so you can inspect the decisions first.
Code below :)