ReFold: Training-Free Reversible Inter-Turn Context Folding for Long-Horizon Agents
On the map: LLM agents and tool use → Agent memory systems also fits: Multimodal and embodied agents
Abstract (arXiv)
Long-horizon LLM agents act on an append-only interaction history that is re-sent to the model at every step, so the context and its cost grow with steps until the sessions exceed the context window. Existing methods manage the context through context requirement prediction, relying on additional model calls, heuristic rules, or trained policies. However, these predictive approaches introduce runtime overhead, invalidate prefix caches, and permanently discard content with no guarantee of recovery. To overcome these limitations, we introduce ReFold: a training-free rendering layer that preserves the underlying interaction history while compressing only the model's rendered context. It removes two kinds of inter-turn redundancy without an auxiliary predictor: content an earlier turn already displayed, replaced by a stub, and turns the agent itself reports finished, folded into a one-line note. Both operators use chunked rendering, rewriting the cached prefix once every few steps rather than at every step. Every removal is strictly reversible, a wrong removal costs one restore from the history rather than permanent content loss. Because it operates at the rendering layer, ReFold is plug-and-play across standard ReAct-style harnesses. Evaluations across five long-horizon benchmarks and two frontier LLMs demonstrate that ReFold reduces token consumption by up to 2.5x and halves the KV-cache memory per session without degrading task success rates. Under capped context budgets, it avoids up to 92% of forced compactions. Under concurrent serving workloads, it reduces request queuing delays by up to 100%, accelerating inference by up to 1.7x, while cutting inference costs by up to 3.4x.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. First posted on arXiv 6 Oct 2026.
Builds on
No reference list yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025FoldAct: Efficient and Stable Context Folding for Long-Horizon Search Agents
- 2025Scaling Long-Horizon LLM Agent via Context-Folding
- 2026FOCUS: Training-Free Decision-Preserving Context Compression for LLM Agents
- 2026Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations
- 2026Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability
- 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agents
- 2026ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL
- 2026StateComp: Learning When to Compress History in Long Horizon Agents