Folio: Recoverable Multi-Resolution Context Folding for Long-Horizon Language Agents
Yubo RuanTao PengJiao ZhangChuanguo MaLei XuHan ZhouWenwu WangXiafei LvXingjie ZhouGuiju FanHao WangFenghui Zhang +2
Yubo Ruan
Tao Peng
Jiao Zhang
Chuanguo Ma
Lei Xu
Han Zhou
Wenwu Wang
Xiafei Lv
Xingjie Zhou
Guiju Fan
Hao Wang
Fenghui Zhang
+14
Folio is a context manager for long-horizon language agents that records, folds, and recovers history through one set of linked handles, avoiding the reread-and-rewrite cost of model-written compaction. While the agent runs, it records a short L1 turn note written by the model in its ordinary reply, an L2 runtime-written event manifest of every call, and L3 captured source records; because these views already exist, the runtime folds programmatically, selecting coarser views for older turns, and the fold prints the handles indexing L2 and L3 so recovery tools can reach evidence with little added input. Its trigger prices an explicit landing point including the retained budget. On 75 LOCA-bench tasks with DeepSeek-V4-Pro behind every system, Folio solves 66, versus 54 for the same runtime with model-written compaction and 49-59 for Claude Code, Codex, and SoL-Pi, in about half their working time and at 2.4 times lower cost than that runtime, with each fold taking a median of 0.6 seconds.

arXiv ·
· November 12, 2026