
Context as an Environment: Programmatic Context Management for Long-Horizon Agents
Scroll replaces prompt-side history compression and fixed memory representations with an append-only event log plus a persistent sandboxed Python kernel, where the model writes code to search and materialize state and only printed projections enter the working context. It costs engineering effort to build and sandbox the kernel and eviction index, adds code-execution latency per turn, and its reported results depend on a strong proprietary backbone. It can fail if the model writes faulty state-management code, if eviction landmarks mislead retrieval of evicted regions, or if sandboxing is insufficient against unsafe exec output.









































