Engineering

The Five-Rung Compaction Ladder: Cheap First, Destructive Last

Eric Brasher August 5, 2026 at 7:30 AM 6 min read

Long-running agents do not usually fail because they forgot everything. They fail because the next prompt grows until it becomes slow, expensive, or impossible. Today we introduced a five-rung compaction ladder that reduces context in a deliberate order: the cheapest and most reversible action first, the bluntest action only as insurance.

Rungs One and Two: Reduce the Current Run

At 50% of the usable window, FabrCore begins evicting old tool results from the request. The model keeps a compact one-line account of what happened, while the complete result remains in the source history. This is fast, local, and reversible on the next turn.

At 80%, the runtime truncates the oldest remaining tool-result groups from the constructed context. Again, persisted history is not rewritten. These two rungs target the material most likely to explode during an autonomous loop: search results, documents, API responses, and verbose diagnostic payloads.

Rung Three: Consolidate Durable History

At 87%, history compaction summarizes older conversation entries and rewrites the persisted thread while preserving the most recent messages. This costs an LLM call and is intentionally permanent, so it happens only after the reversible in-run reductions have had a chance to work.

Compaction state uses a lease with stale detection so another activation can recover abandoned work. The summary is marked as compacted history rather than pretending to be a verbatim conversation. Operators can tell that consolidation happened and inspect token metrics around it.

Rungs Four and Five: Fuse and Stop

At 90%, the read-side projection acts as a fuse. It clips pathological inputs that escaped the earlier layers. At the full model window, run safety stops the call with a diagnostic instead of asking the provider to fail unpredictably or silently discard context.

The order is the feature. If a later rung is configured to fire before an earlier one, FabrCore can describe the resolved ladder and flag it as out of order. Context control becomes an observable runtime policy rather than scattered magic numbers.

Configure the model, not every call

Set ContextWindowTokens and MaxOutputTokens, then review the complete defaults and overrides in the Compaction Ladder guide.