Contexture removes outdated history when GPU caches are strained
Contexture: Runtime Context Eviction for High-Throughput Agent Serving · arXiv:2611.26980
In plain words
Long-running AI agents keep sending their growing conversation histories to a model. The model's saved work from earlier requests fills shared GPU memory, so the serving system may spend time recomputing instead of finishing more sessions.
Contexture spots older tool results that later actions have replaced, then removes them from the model's prompt when shared memory conditions make removal worthwhile.
In replay tests across eight configurations, it completed more sessions than the strongest listed alternative at the study's slowdown limit.
The research
When many agent sessions share a serving system, growing histories can consume memory and trigger repeated computation without finishing more work.
The result changes the expectation that history must simply keep accumulating: in the tested configurations, selectively removing superseded material supported more completed sessions within a fixed slowdown limit, with live probes checking task accuracy.
Contexture removes tool history that later actions supersede, timing each removal around shared GPU cache pressure to serve more concurrent agent sessions.
In replayed sessions, the researchers compared Contexture with no eviction, compaction, AgentDiet and Continuum across eight configurations. They counted completed sessions per minute where the 90th-percentile slowdown reached ten times the same task's unloaded, no-eviction level.
Contexture completed 20–73% more sessions per minute than the strongest listed alternative in each configuration. This supports increased serving capacity under that slowdown limit, though the size of the gain differed across configurations.
The throughput experiments replayed fixed agent trajectories, so they do not capture behavior changes caused by history removal. Fully live execution was reported for one model, harness and task-test combination at three load levels.
What the evidence shows
- A shared memory bottleneck
Contexture is a runtime system for removing superseded history from the model's input while leaving the agent harness's full conversation intact. This targets a serving bottleneck: concurrent sessions compete for finite GPU memory to hold cached states, and once that pool fills, recomputation can rise without more completed sessions.
The system uses later tool actions to identify candidate material, then uses shared cache conditions to time removal.
- More sessions at the limit
The limit is reached when 90% of sessions are no more than ten times slower than the same task served unloaded without history removal.
Compared with the strongest listed alternative in each setup, Contexture served more completed sessions, though the size of its advantage varied across the eight configurations.
- A qualified comparison
Observation masking, which replaces older tool outputs with placeholders, is a useful contrast because it also reduces history. Contexture completed 7–63% more sessions per minute in five configurations.
In the other three, all using the mixture-of-experts model, masking completed 6–25% more sessions per minute, but its task accuracy was lower. So the throughput comparison does not give Contexture the lead in every configuration, and the exception comes with an accuracy tradeoff.
- Task performance under load
The researchers checked task performance with live probe sessions, since replay fixes the agents' recorded outputs. Default task evaluators marked probes as passing or failing, and the researchers compared the fraction passing with unloaded no eviction.
Across eight configurations and three Contexture load levels, mean accuracy was 1.4 percentage points higher, while the worst loss was 3.7 points. These aggregates support a bounded accuracy conclusion, not a claim that every task was preserved.
- Which parts added capacity
A component test helps explain how the serving result arose in one workload. With Qwen and Hermes on one task test, candidate selection raised throughput at the slowdown limit by 20% over no eviction; adding cold removals left peak throughput about unchanged; and a pressure gate added a further 4% across three traces.
This isolates useful steps in that tested setup, while the broader result comes from the eight-configuration comparison.
Deep
- Original paper authors
- Colin Hong, Bryan Shan, Wei Siong Pang, Chengzhi Lu, Xu Guo
- Submitted to arXiv
- License
- arXiv non-exclusive