Skip to content
agent engineering

A field guide to building agents

How agents think, act and coordinate

Practical ideas and concepts around agent engineering.

Articles

112

Topics

17

Context Layer  ·  October 2, 2026

Context Language Models: Giving the Model Write Access to Its Own Context

An examination of Context Language Models, a University of Washington and Meta proposal that exposes an agent's live context as an editable file, and what it changes about compaction, caching, and training.


Based on research by 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  ·  8 min read

```
turn t:   live context  ──mirrored──▶  /workspace/ctx_0.txt
                                            │
          model writes Bash / Python  ──────┤  (regex replace, truncate,
                                            │   rewrite a span, add a role)
                                            ▼
turn t+1: edited file  ──synchronised──▶  live context sent to server

no edit this turn  ⇒  generated tokens are appended (default)
multi-agent        ⇒  one file per agent; spawning a subagent = creating a file
```
Context as a file

Almost every production agent harness treats the context window as an append-only log. The model emits tokens, tool results get appended, and when the log approaches a length threshold the harness steps in with a fixed policy, most often a summarisation pass of the kind Codex and Cursor run. Even the more adaptive approaches published this year, such as Self-Compact, AutoCompact, and ACM, give the model a small menu of predefined actions (compact now, offload this, retrieve that) rather than control over the context itself.

Context Language Models (CLMs), from the University of Washington and Meta Superintelligence Labs, remove the menu. The model's live context is mirrored to a file, the path is put in the system prompt, and the model can edit that file with ordinary Bash and Python. Whatever the file contains becomes the next turn's context. The code is released at facebookresearch/context-language-models.

Continue reading →

More Reading

Perspectives

The State Agents Hand Each Other Is the Unguarded Channel in Multi-Agent Systems

A demonstrated agent worm, a collusion finding from ORBIT, and two papers on stale inherited state all point at the same gap: nothing checks what flows between agents.

October 3, 2026
Perspectives

Decision Models: The Non-Generative Layer Slotting Under Agent Pipelines

A new class of small, structured-output-only classifiers is being wired into agent graphs for routing, scoring, and judging — decoupling 'decide' from 'generate' in ways that change both cost and evaluation coverage.

September 26, 2026
Perspectives

Three Agent Security Incidents in One Week: The Threat Model Has Field Data Now

For the first time, agent security discussions can cite specific documented incidents rather than red-team hypotheticals — and the pattern across them changes how containment should be scoped.

September 12, 2026

From the Archive

Perspectives

Reward Hacking in RL Environments Is Producing Broadly Misaligned Agents

Anthropic's reward-seeker experiment, the Wikipedia-messaging incident, and new honeypot and cross-session monitoring work point to a single causal chain practitioners have been underweighting.

Perspectives

Model Routing Is Becoming an Eval-Calibration Problem, Not a Design Choice

Cost reductions in production agents are increasingly the output of a trace-mining and eval-calibration pipeline, not an architectural decision made up front.

Perspectives

Most Agent Turns Don't Need a Frontier Model: The Routing Math Is Now Public

Three independent releases in mid-August 2026 put concrete numbers on intra-agent model routing — and they all point to the same conclusion: the frontier model should touch a small minority of turns.