← Back to Paper Radar

Context Language Models

Rulin Shao, Shannon Zejiang Shen, Junjie Oscar Yin, Yuetai Li, Minheng Wang, Hamish Ivison, Radha Poovendran, Nathan Lambert, Teng Xiao, Mike Lewis, Wen-tau Yih, Luke Zettlemoyer, Pang Wei Koh
arXiv.org | 2026

Reading guide · Based on sections of the original paper

The authors propose Context Language Models, which expose the live context as a Bash-editable file so the model can rewrite its own context. They report that existing models used this way zero-shot beat fixed or tool-based context-management harnesses on accuracy and on estimated compute.

Why read this

Read this if you build long-horizon agents and want evidence on whether letting the model edit its own context beats summarization harnesses, and at what cost under prefix caching.

What the authors found

  • With Qwen3.6-27B, a 32K budget, and no training, the authors report 59.4% on all 830 BrowseComp-Plus questions. That is 11.4% relative above Codex-style summarization, the strongest baseline, with 21.5% fewer prefix-reuse FLOPs. Those FLOPs are a theoretical estimate, not measured compute. On TerminalBench 2.1 CLM only matches summarization, using 70% of its FLOPs. On TBLite it scores 73.7% versus 67.0%. 5.1.1 Coding and Deep Research Tasks
  • The paper reports a smaller model gaining from RL on deep research. Before training, Qwen3.5-9B with CLM trailed the summary harness (28.8% vs 34.7%). After stepwise GRPO with a success-gated FLOPs advantage on OpenResearcher, it reached 42.5% on held-out BrowseComp-Plus, versus 42.1% for the summary harness trained with the same recipe. Cost was 1.34 versus 2.19 PFLOPs per question. 5.2 Learning Better Context-Management Strategies in Context or in Weights
  • On 12-hour EdgeBench-10 at a 32K budget with Qwen3.6-27B, CLM scored 44.6 at 179 prefix-reuse PFLOPs per trial. Summarization scored 42.3 at 437 PFLOPs. Scores are best-of-three seeds over ten tasks. 5.1.2 Open Discovery Problems

Main limitation

The gains depend on budget and model. At a 128K budget on EdgeBench-10, single-agent CLM slightly trails summarization (47.3 vs 47.8), though at lower compute. Only the subagent variant leads there. The authors also note that gains shrink with weaker models. Appendix F Supplementary Results

Where to start

Appendix F Supplementary Results · Check the 9B-versus-27B editing behavior, the 128K EdgeBench reversal, and the held-out skill-evolution numbers before assuming the gains transfer to your model and budget.

Abstract

We introduce Context Language Models (CLMs), language models that natively manage their own context. We implement this by treating the context as a file and allowing the model to make unrestricted updates to this file. This allows the model to learn what is most important to maintain in context, and naturally extends to multi-agent systems where multiple agent contexts coexist as files. Building CLMs zero-shot with existing models outperforms SOTA context management strategies across a variety of tasks: 11.4% higher accuracy with 21.5% fewer FLOPs on BrowseComp-Plus, 5% higher scores with 59% fewer FLOPs on 12-hour EdgeBench, and 65% greater improvement with the same compute on a 24-hour multi-repository agent-swarm task. Moreover, by shifting context management from external harness control to intrinsic model behavior, CLMs naturally enable both in-context and parametric learning of context-management strategies. We show that CLMs can be steered with natural-language instructions evolved through a standard skill-optimization loop, improving held-out accuracy by up to 35.9 points on a context-management task while reducing compute. We also introduce an online reinforcement learning method for CLMs, improving Qwen3.5-9B performance on BrowseComp-Plus by 47.6% while using 12% fewer FLOPs. Finally, we co-design Suffix Cache Reuse for CLM serving, further reducing server-side compute by 35% relative to standard SGLang at matched performance.

Generated automatically from paper sections on 2026-11-28.