cd /news/artificial-intelligence/context-as-an-environment-programmat… · home topics artificial-intelligence article
[ARTICLE · art-109690] src=machinebrief.com ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

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

Researchers introduced Scroll, a context manager that treats each LLM agent session as an executable Session Environment with an append-only Event Log and a persistent Python kernel, enabling programmatic context management for long-horizon tasks. Using Qwen3.8-Max as the backbone, Scroll achieved 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).

read1 min views4 publishedAug 25, 2026

arXiv:2608.21690v1 Announce Type: new Abstract: 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.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @scroll 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/context-as-an-enviro…] indexed:0 read:1min 2026-08-25 ·