Metraipolis › archive › dc_476462e67fa5

Context as an Environment: Programmatic Context Management for Long-Horizon Agents — arXiv:2608.21690

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.21690
License (as archived)
CC0-1.0
Archived
2026-10-18T07:38:48.552Z
SHA-256 of the archived text
4c5d9fc4769bf6692e6ba97b14202560631d62aeb7c9347c38a28491655afaf5
Stable URL of this page
https://metraipolis.com/documento/dc_476462e67fa5

How to cite

Context as an Environment: Programmatic Context Management for Long-Horizon Agents — arXiv:2608.21690 — arXiv (en), https://arxiv.org/abs/2608.21690 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_476462e67fa5 (Metraipolis archive dc_476462e67fa5, sha256 4c5d9fc4769bf6692e6ba97b14202560631d62aeb7c9347c38a28491655afaf5)
BibTeX
@misc{dc476462e67fa5,
  title = {Context as an Environment: Programmatic Context Management for Long-Horizon Agents — arXiv:2608.21690},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.21690},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_476462e67fa5; sha256 4c5d9fc4769bf6692e6ba97b14202560631d62aeb7c9347c38a28491655afaf5},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.21690. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

LLM agents increasingly take on long-running tasks whose history grows far beyond a single model context window. Existing approaches compress earlier interactions or extract selected information into fixed memory representations, committing to what to preserve before future needs are known. We present Scroll, a context manager that treats each agent session as an executable Session Environment. The environment is backed by an append-only Event Log and a sandboxed, persistent Python kernel. The kernel maintains a typed namespace across model calls, allowing tool outputs, retrieved history, and derived state to be bound to variables rather than serialized into the prompt at each call. Model-written code searches, materializes, and transforms session state through exec; only explicitly printed projections enter the model's working view for the next call. Context management thus becomes a programming task that inherits the improving coding abilities of LLMs, while the Event Log preserves lossless historical ground truth. As the working view approaches its budget, stale spans are evicted but remain recoverable: an eviction index keeps compact landmarks tied to exact Event Log addresses, so that the agent navigates directly to evicted regions instead of searching the full log. With Qwen3.8-Max as the backbone, Scroll achieves 94.8% on LongMemEval_S; 73.1% on BEAM_10M, surpassing the best published memory system by 5.1 points; and 86.7% on LOCA_256K, exceeding the best published long-horizon agent by 37.4 points.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-25 in cs.AI).
Categorie arXiv: Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2608.21690 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-18T07:37:52.662Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-25?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).