Rulin Shao1,2, Shannon Zejiang Shen3, Junjie Oscar Yin1,2, Yuetai Li1, Minheng Wang1, Hamish Ivison1, Radha Poovendran1, Nathan Lambert4, Teng Xiao1, Mike Lewis2, Wen-tau Yih2, Luke Zettlemoyer1,2, Pang Wei Koh1
1University of Washington 2Meta Superintelligence Labs 3MIT 4Trillium Labs

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.
Run the minimal CLM agent on any Harbor task:
pip install -e .
clm-harbor run -p <harbor-task> -a clm-minimal -m openai/<model> \
--agent-kwarg api_base=http://localhost:8000/v1
clm-harbor is the Harbor CLI with CLM available as -a clm-minimal. See
clm/clm_harness for configuration and serving.
pi install npm:@lolipopshock/pi-clm
clm/clm_harness | CLM implemented in Harbor |
clm/clm_icl | skill evolution |
clm/clm_rl | reinforcement learning |
suffix_cache_reuse | Suffix Cache Reuse: KV-cache reuse for CLM serving, as a patch to SGLang |
If you find our work helpful, we would appreciate it if you could cite our paper:
@article{shao2026context,
title = {Context Language Models},
author = {Shao, Rulin and Shen, Shannon Zejiang and Yin, Junjie Oscar and Li, Yuetai and
Wang, Minheng and Ivison, Hamish and Poovendran, Radha and Lambert, Nathan and
Xiao, Teng and Lewis, Mike and Yih, Wen-tau and Zettlemoyer, Luke and Koh, Pang Wei},
journal = {arXiv preprint arXiv:2609.37725},
year = {2026}
}
This project is licensed under CC BY-NC 4.0. See also NOTICE.
Python
98.9%
Shell
1.1%
Rulin Shao1,2, Shannon Zejiang Shen3, Junjie Oscar Yin1,2, Yuetai Li1, Minheng Wang1, Hamish Ivison1, Radha Poovendran1, Nathan Lambert4, Teng Xiao1, Mike Lewis2, Wen-tau Yih2, Luke Zettlemoyer1,2, Pang Wei Koh1
1University of Washington 2Meta Superintelligence Labs 3MIT 4Trillium Labs

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.
Run the minimal CLM agent on any Harbor task:
pip install -e .
clm-harbor run -p <harbor-task> -a clm-minimal -m openai/<model> \
--agent-kwarg api_base=http://localhost:8000/v1
clm-harbor is the Harbor CLI with CLM available as -a clm-minimal. See
clm/clm_harness for configuration and serving.
pi install npm:@lolipopshock/pi-clm
clm/clm_harness | CLM implemented in Harbor |
clm/clm_icl | skill evolution |
clm/clm_rl | reinforcement learning |
suffix_cache_reuse | Suffix Cache Reuse: KV-cache reuse for CLM serving, as a patch to SGLang |
If you find our work helpful, we would appreciate it if you could cite our paper:
@article{shao2026context,
title = {Context Language Models},
author = {Shao, Rulin and Shen, Shannon Zejiang and Yin, Junjie Oscar and Li, Yuetai and
Wang, Minheng and Ivison, Hamish and Poovendran, Radha and Lambert, Nathan and
Xiao, Teng and Lewis, Mike and Yih, Wen-tau and Zettlemoyer, Luke and Koh, Pang Wei},
journal = {arXiv preprint arXiv:2609.37725},
year = {2026}
}
This project is licensed under CC BY-NC 4.0. See also NOTICE.
Python
98.9%
Shell
1.1%