Papers · 2026 · Reading: 24 min, plus 3 in closed details.
Paper · arXiv preprint, 2026 · arXiv 2609.37725

Context Language Models (CLMs)

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
University of Washington, Meta Superintelligence Labs, MIT, Trillium Labs · 29 September 2026 (arXiv v1, the only version as of 19 October 2026)

In one line: Handing the model its own context as a file to rewrite makes context management model behaviour that a prompt can steer and RL can train. Zero-shot it pays off with a strong model: Qwen3.6-27B on BrowseComp-Plus scores 59.4% against 53.3% for summarisation (+11.4% relative) with 21.5% fewer calculated FLOPs and ties on TerminalBench 2.1, in single runs; with a 9B model it is not the best method. After RL the clear gain is cost (38.8% fewer FLOPs): accuracy is 0.4 points above an equally trained summary harness, and the abstract's +47.6% is against CLM's own untrained start.

Scoped on 26 October 2026. The database Takeaway as fetched said CLMs beat harness-side context management and cited +47.6% after RL; the 19 October rewrite still said it beats it at lower cost in zero-shot runs without limits. The paper's own evidence: one run per setting, a tie on TerminalBench 2.1, Self-Compact ahead of CLM on BrowseComp-Plus with Qwen3.5-9B (Figure 19), FLOPs calculated rather than measured, and the +47.6% measured against CLM's untrained start (Table 2). The Notion property needs the same edit.

+11.4% relative
BrowseComp-Plus accuracy against Codex-style summarisation (59.4% against 53.3%), with 21.5% fewer prefix-reuse FLOPs
Qwen3.6-27B, 32K, zero-shot · Figure 5
+0.4 points
after RL: CLM 42.5% against the summary harness trained with the same recipe, 42.1%; the abstract's +47.6% is against CLM's own untrained start
Qwen3.5-9B, 38.8% fewer FLOPs · Table 2
−35% server compute
Suffix Cache Reuse against standard SGLang at the same accuracy (60.2%); two thirds of the reuse comes from stripped reasoning, not from CLM edits
BrowseComp-Plus, 830 questions · Figure 11

How far to trust it: Believe the design (the live context as a file the model edits) and the FLOPs accounting, which reproduces to the digit. Treat the size of the accuracy wins as provisional: one run per setting, CLM alone gets retries, free editing turns and budget nudges, the RL win over a trained summary harness is 0.4 points, and on the 9B model zero-shot Self-Compact beats CLM on BrowseComp-Plus. The evidence, judged.

The idea in one sentence: a Context Language Model is handed its own context as a file it may rewrite with ordinary Bash, so what to keep stops being a harness rule and becomes model behaviour that a prompt can steer and RL can train; the price is that every edit breaks the server's prefix cache, so the paper counts cost in prefix-reuse FLOPs and patches the server to reuse what survives an edit (Suffix Cache Reuse).

You need: why a serving engine's cache hit must be a prefix (Batching, KV cache and scheduling); GRPO's group-relative advantage (RL for LLMs); how production harnesses compact today (Context engineering). New terms: live context file (the next call's input, mirrored to a file the model edits); harness-defined and action-based context management (fixed rules, or a fixed menu of tools the model triggers); context pressure (input volume over the window); prefix-reuse FLOPs (compute a prefix-caching server would do, from the first mismatch on); re-prefill (recomputing cached tokens after an edit); stepwise GRPO and the success-gated efficiency advantage (the RL recipe); Suffix Cache Reuse (SCR: keep the cache of spans that survive an edit).

One move (the context is a file, any function of it is allowed) and the four things the paper does with it
The paper's Figure 1: context c_t as a file, a CLM computing any function of it, context c_t+1 as a file; below, four panels: qualitative examples of edits, zero-shot results on BrowseComp-Plus and Software World, steering and evolving in context, and the stepwise GRPO advantage with before and after RL bars
Read the top strip first: ct to ct+1 through any function the model writes. The panels follow this page's order: edits models made (§4.1), zero-shot results (§5.1), steering and evolving (§5.2), RL (Table 2). Panel B leaves out TerminalBench, where CLM ties, and the 9B model, where it is not the best method. Tap to enlarge.
Figure 1 of Shao et al., "Context Language Models" (arXiv 2609.37725), CC BY 4.0 (licence); resized, otherwise unchanged.
Not the same paper as "Latent Context Language Models"

This knowledge base also has End-to-End Context Compression at Scale (Latent Context Language Models), a June 2026 paper whose encoder compresses the context into latent vectors before the decoder reads it: a new architecture, trained on 350B tokens. The paper on this page changes no architecture: an ordinary model is given its own text context as a file and rewrites it with Bash. Different authors, different mechanism, different claims.

Problem

§1, §2, §3

An agent's context is everything the model reads on its next call: the system prompt, the task, and the transcript of every thought, command and tool result so far. A deep-research agent on BrowseComp-Plus gets 10 search snippets of 512 tokens per search and documents of up to 8,192 tokens (Appendix E), so a 32K window fills after a handful of turns. A plain language model only ever appends to its context (Eq. 1):

ct+1 = ct ⊕ fθLM(ct)

where ct is the context at turn t and ⊕ is concatenation. Something else must decide what to drop. Today that is the harness, the program around the model that runs the loop (see Context engineering for the designs in production). The paper sorts prior work into two families (§2, Appendix A): harness-defined rules (summarise past a threshold: Codex, Cursor, Terminus2, MEM1) and action-based tools the model triggers from a fixed menu (Self-Compact, ACM, Context Folding and others). Either way, a human designed the menu.

The two families, system by system
  • Harness-defined: fixed rules. Codex and Cursor summarise everything when the context passes a length threshold; Terminus2 does the same; MEM1 rewrites its state every turn. The model writes the summary, but the harness picks when and how.
  • Action-based: the model triggers human-designed tools. Self-Compact and AutoCompact let it decide when to compact; Context-as-a-Tool, ACM (offload and retrieve), Context Folding (branch and fold) and Sculptor (hide fragments) widen the menu. The menu is still fixed.

Recursive Language Models (RLMs) are the nearest neighbour: they put a long input in a REPL variable the model reads on demand, but the live context stays read-only and keeps growing (§2).

A diagnostic first. To separate context management from reasoning and knowledge, the authors built ContextBench, four synthetic tasks (Needle Retention, Sudoku Sketchpad, KV Store, Log Triage) whose input arrives one operation per message, so nothing can be filtered on the way in (§3, Table 3).

The four ContextBench tasks, in detail
  • Needle Retention: about 4K-token chunks of 2 to 8 "needle" lines and 140 filler lines; keep the needles verbatim, delete the filler.
  • Sudoku Sketchpad: a 16×16 board kept in the context while moves stream in, one per turn; reproduce every version exactly.
  • KV Store: batches of 100 SET operations with 24-word values, then 24 GET queries.
  • Log Triage: batches of 14 to 54 service log lines, then 24 lookup and count queries.

The limit is fixed at 32,768 tokens (2,048 reserved for the reply) and the context pressure, total input over that limit, rises to 24× (Appendix D). With GPT-5.4, no existing method is perfect even here: summaries lose or invent needles and board cells, methods without in-place editing must rewrite the whole board for each move, and coding tools can copy a batch to disk but cannot remove it from the live context (Figure 2). The decoded curves are on the Tables tab: on KV Store, Base falls to 0 from about 0.8× pressure and Context Folding from about 1.5×; CLM stays at 1.0 on three tasks and 0.97 to 1.0 on Log Triage.

Idea: the context as a file

§4.1

A Context Language Model (CLM) produces its next context directly (Eq. 2):

ct+1 = fθCLM(ct)

where f can be any function the model chooses: the model is allowed to make "unrestricted updates" to its context (abstract). Every harness rule and every context tool above is a special case, which is why the paper says Eq. 2 "subsumes" them. The difference is who writes the function: the harness author, or the model.

How it is built. The live context is mirrored to a file whose path is in the system prompt. The model edits it with ordinary Bash or Python, and each edit is synchronised back into what the server sees on the next call; if the model does not edit, its output is appended as usual (§4.1). Several agents are several files: a swarm starts with several context files, and a subagent is created or ended by creating or deleting one.

The file as the released harness lays it out

In the released harness the file is /tmp/.live_ctx/LIVE_CTX_MAIN.txt, turns are delimited by [[CTX_TURN i role=...]] headers, and the system prompt shows a one-line re.sub that collapses a turn into a note (clm_agent/prompts.yaml).

What the models did with it, zero-shot (Figure 3):

  • an orchestrator kept an in-context scoreboard of its subagents and updated it with 163 in-place edits while the context stayed at 6 to 8K tokens;
  • it invented a new chat role, role=notes, for its own working notes;
  • it wrote loops that replace stale search results with one line ("Searched: ... No relevant results.");
  • it defined a helper, compact_turns, and called it 37 times to fold old results into a reference to a progress note;
  • and it reproduced what good summaries do: 21K tokens compressed to answer-relevant facts, or a ledger of untried ideas kept for later.

These are hand-picked examples from the zero-shot runs of §5.1, not frequencies. How often each behaviour occurs is not reported.

What an edit costs: prefix-reuse FLOPs

§4.1, Appendix C

Why edits are not free. A prefix cache reuses earlier keys and values only up to the first token that differs (the lookup and why it must stop there: Batching, KV cache and scheduling; the paper's version in Appendix B). Appending keeps the whole previous prompt as a cached prefix. Editing turn 3 of 20 throws away the cache of turns 3 to 20, and they are re-prefilled, recomputed from scratch, on the next call.

So the paper does not count tokens; it counts the compute a prefix-caching server would actually do over a whole trajectory, prefix-reuse FLOPs (Eq. 3): the prefill of everything from the first mismatch onward, plus the decoding of every generated token. Appendix C gives the full model. At turn t the prompt has Pt tokens, the longest prefix of whole messages seen in an earlier prompt has Rt, the model generates Gt:

Ft = Ctoken(Ut + Gt) + Cattn[ ½(Pt² − Rt²) + GtPt + ½Gt² ], Ut = Pt − Rt

Ctoken is the cost of pushing one token through every weight matrix (Eq. 7), Cattn the cost of one query-key pair in the full-attention layers (Eq. 8); the bracket counts prefill attention, then decode attention (Eq. 9). For Qwen3.6-27B, a hybrid with 16 full-attention layers and 48 Gated DeltaNet (linear-attention) layers (see Beyond attention), the paper prints Ctoken = 48.70 × 10⁹ FLOPs (MLP 34.23, attention projections 3.36, Gated DeltaNet projections 11.12) and Cattn = 3.93 × 10⁵.

One Qwen3.6-27B turn: a 20,000-token prompt, a 500-token reply. If the agent only appended, 18,000 tokens are cached. If it edited the middle of its context, 10,000 are. How many times the append-only turn's compute does the edited turn cost?

How to read the cost numbers. These are calculated FLOPs from token counts, not measured GPU time; embeddings, the output layer, the recurrent-state update and normalisation are left out (Appendix C). They assume an ideal prefix cache. The one measured comparison in the paper, from a real SGLang server, came out at 10.98 PFLOPs per BrowseComp-Plus question for CLM (Figure 11), against 5.90 calculated for the run of Figure 5: a different run, but a hint that real servers reuse less than the ideal (the paper blames SGLang's hybrid-model caching, Figure 15).

The released FLOPs metric against the paper's

The released metric, kv_cache_flops.py, uses the same two constants (2 × 24.3532 × 10⁹ and 4 × 16 × 6,144 per pair) but prefers the server's own cached-token counts when they are logged, and approximates decode attention by an average over turns.

One turn's bill: where an edit's cost goes

Predict first: drag Rt from 90% to 50% of the prompt; does the bill double, or more? Eq. 9 for one call, split by operation in Figure 16's colours (MLP, full-attention projections, Gated DeltaNet projections, query-key pairs; grey is what prefix caching avoided). The defaults reproduce Figure 16's 1.41, 5.74 and 10.81 × 10¹⁴ FLOPs independently: the constants come from the model's shape (Appendix C), not from the figure.

Learning context management, in context or in weights

§4.2

Once context management is something the model does, it can be taught like any other skill. Three levels:

1. Tell it. Add an instruction or skill document s to the context: ct+1 = fθCLM(ct; s) (Eq. 4).

2. Evolve the instruction. Search for the s that maximises expected reward, s* = argmaxs E[R(τ(x; s))] (Eq. 5), with a prompt-evolution loop in which proposer models read rollouts and rewrite the skill. In assisted evolution the agent is Qwen3.6-27B and Claude Fable 5.1 proposes; in self-evolution Opus 5 does both.

The evolution loop's budget and splits

Four proposer models read at least ten rollouts each and write rewrites; a candidate runs on 6 training instances, then 12 more if it matches the frontier, then on a development split of 102 instances per task; the final skill is scored once on a held-out test split of 102 instances with three seeds (Appendix E).

3. Train it. Because edits change the input between calls, an edited trajectory is not one long sequence. Stepwise GRPO samples a group of whole trajectories per prompt, computes the usual group-relative advantage from each trajectory's outcome (GRPO itself: RL for LLMs and DeepSeekMath), and gives that advantage to every model call inside the trajectory. Outcome alone is weak supervision for editing (a successful run can contain wasteful edits), and rewarding edits or deleted tokens invites reward hacking. So the paper adds a success-gated efficiency advantage (Eq. 6): among the successful trajectories of a group, with mean cost c̄,

Aieff = clip((c̄ − ci) / c̄, −1, 1) if i succeeded, else 0; Ai = Aiout + weff Aieff

where ci is trajectory i's prefix-reuse FLOPs. With fewer than two successes nobody gets an efficiency term. Cheap failures earn nothing, so the model cannot win by deleting its way to a short, wrong answer. Click the rollouts on the card to flip success and failure; costs are illustrative, weff = 0.25 as in the paper's run (Appendix E).

The paper's RL run: data, batch, steps, reward and hardware

The paper's RL run: Qwen3.5-9B on 3,040 OpenResearcher deep-research prompts, 8 prompts × 32 rollouts per step for 70 steps, learning rate 10⁻⁶, KL coefficient 0.01, a binary reward from GPT-5.4-nano with the DeepSearchQA rubric, plus penalties for failed tool calls and malformed output (CLM only); 16 H200s for the policy and 48 for rollouts (Appendix E).

Suffix Cache Reuse

§4.3, Appendix B

The cost model above is what CLMs pay on a standard server. Suffix Cache Reuse (SCR) cuts it. When a context [A B C] becomes [A B′ C], standard prefix caching re-prefills B′ and C; SCR diffs the new prompt against the session's previous one, keeps the cached keys and values of surviving spans such as C, re-rotates their position encodings to the new offsets, and prefills only B′ and new text (Figure 4, Figure 12). It relocates at most K spans per edit, the longest first (K = 6 in the paper), and falls back to normal prefill if it cannot get cache slots.

It is an approximation: C's cached states were computed while B, not B′, came before it. The paper's sensitivity sweep over K from 1 to 64 on 64 questions found no accuracy loss (Figure 13).

How SCR handles the hybrid model's linear-attention layers

On the hybrid model only the 16 full-attention layers can relocate per-token entries; the 48 linear-attention layers carry one recurrent state, so SCR snapshots that state from before the edit and continues from it: B′ is not run through the linear layers' recurrence, though it still reaches later linear layers through the full-attention layers' outputs.

On BrowseComp-Plus, SCR reuses 7.8% of all prompt tokens beyond what plain prefix caching already hits. How much of that 7.8 comes from the model's own context edits?
Same edit, two servers: standard serving re-prefills C, SCR keeps its cache
The paper's Figure 4: context A B C edited to A B-prime C; standard serving reuses the prefix A, prefills B-prime and re-prefills C; Suffix Cache Reuse reuses A, prefills B-prime and reuses the cached suffix C
Notice the red cross: both servers lose the cache at the first mismatch; only the right one picks it up again after B′. Standard prefix caching is the left half; SCR is the right.
Figure 4 of Shao et al., "Context Language Models" (arXiv 2609.37725), CC BY 4.0 (licence); resized, otherwise unchanged.

One trajectory, call by call

The two ideas above, cost and SCR, play out over a whole episode. In the figure each row is one model call's prompt, drawn to scale along a 32,768-token window, from call 1 at the back to the last call at the front. Cached blocks lie flat; blocks the server must compute stand up: new tokens, tokens re-prefilled after an edit, tokens SCR reuses and the model's own output. The bar at the head of each row is that call's bill from Eq. 9 for Qwen3.6-27B.

The episode is the Replay tab's illustrative one (24 deep-research actions with BrowseComp-Plus result sizes), with the CLM folding finished turns into notes once the context passes 75% of the released configuration's 28,672-token budget and keeping the newest turn verbatim. The pricing is the paper's; the trajectory and the CLM's rule are stand-ins, so the totals are not the paper's results.

  1. Append: calls 1 to 4. Each prompt is the previous prompt plus the last command and its result, so the cache holds all of it and only the new tail is prefilled: 1,800 tokens, then 5,600, 5,600 and 6,660. The prompt grows from 1,800 to 19,660 tokens; the bills are 1.03, 2.98, 3.09 and 3.84 × 10¹⁴ FLOPs.
  2. Call 5: past 75% of the budget, the model edits. The prompt is 25,260 tokens, over the 21,504 that are 75% of the budget (the red glass wall is the budget itself). The model's output on this call is a 260-token edit command that folds turns 1 to 3 into one-line notes and keeps turn 4. The call itself is an ordinary append: 3.37 × 10¹⁴.
  3. Call 6 on a prefix cache: the tail is recomputed. The three turns are now notes of 45, 240 and 420 tokens, and the prompt falls to 8,365 tokens. But the cache hit stops at the first changed message, right after the 1,800-token task: the notes are new, and turn 4 (5,600 tokens), unchanged, is re-prefilled because what precedes it changed. The bill is 3.48 × 10¹⁴, more than call 5's for a third of the prompt.
  4. The same call with Suffix Cache Reuse. SCR finds turn 4 in the previous prompt, moves its cached keys and values to their new positions and prefills only the notes and the edit command: 965 tokens instead of 6,565. The bill falls to 0.66 × 10¹⁴.
  5. The whole episode on a prefix cache. The 24 actions take 33 calls, 9 of them edits. Every call after an edit re-prefills the kept turn (55,564 tokens in all); those nine calls cost 3.32 of the episode's 11.41 PFLOPs.
  6. The whole episode with SCR. The kept turns are reused instead: the nine calls after an edit fall to 0.47 PFLOPs, and the episode to 8.56, 25% less.
  7. Summary at the same threshold, for comparison. A Codex-style summary replaces everything after the task with 1,600 tokens: 30 calls, 6 of them summaries, 9.01 PFLOPs. Nothing after a summary survives to be reused, so SCR saves nothing. Keeping a turn verbatim pays only with SCR; folding every turn (keeping none) costs 8.30 on a plain prefix cache.

Change the triggers, the summary length and what the CLM keeps in the Replay tab, which prices every call the same way and compares the three policies side by side.

Results

§5, Appendix F

All zero-shot comparisons run every method on the same base model and budget, without training, on a shared Mini-SWE-Agent backbone; baselines use their released code where it exists (MEM1 is re-implemented) (§5.1.1, Appendix E).

Deep research and terminal coding (Qwen3.6-27B, 32K)

On BrowseComp-Plus (830 questions over a fixed corpus), CLM scores 59.4% against 53.3% for Codex-style summarisation, the strongest baseline: 11.4% higher in relative terms (6.1 points), with 21.5% fewer prefix-reuse FLOPs than summarisation and 28.9% fewer than MEM1. On TerminalBench 2.1 (89 tasks) it ties summarisation at 53.4% with 70% of its FLOPs (29.5% fewer); on TBLite it scores 73.7% against 67.0% with 91% of the FLOPs (§5.1.1). The chart is Figure 5 rebuilt from its vector paths; the dashed line is the Pareto frontier (no other method is both cheaper and more accurate).

The smaller model is a different story (Figure 19). The appendix reports that Qwen3.5-9B's CLM reaches 39.9% on BrowseComp-Plus, above summarisation's 37.7%, and that it edits less (1.4 edits per TerminalBench task against 2.6 for the 27B model, none in half the tasks), with a median peak context of 30.2K of 32K. What the text does not say, and the figure shows: on BrowseComp-Plus, Self-Compact reaches 42.3% at about 0.67 PFLOPs, more accurate than CLM and far cheaper (CLM sits past the axis break, beyond 3 PFLOPs); on TerminalBench 2.1, CLM is the cheapest point but the least accurate method except MEM1 (20.7% against 27.9% for summarisation). Switch the chart to Qwen3.5-9B to see it. The authors' own reading: CLM's gains "grow with the model's ability" to decide when and how to edit.

Open-ended optimisation (Claude 4.6 Sonnet)

On four AlphaEvolve problems, CLM with an in-context description of the evolutionary algorithm beats the specialised OpenEvolve workflow on all four best-of-run scores, by up to 16.8% (Heilbronn triangles); each method ran once (Table 1).

Table 1 problem by problem

Circle packing 2.618 against 2.541 (3.0%), Heilbronn triangles 0.03653 against 0.03127 (16.8%), the min-max distance ratio 0.07758 against 0.07690, Erdős minimum overlap 0.38094 against 0.38123 (lower is better). With up to five subagents, circle packing reaches 2.636 (Table 1). Each method ran once, for at most 100 scored attempts or five hours (Appendix E).

On EdgeBench-10 (ten repository-optimisation tasks, 12 hours each, best of three seeds per task, 32K budget), Qwen3.6-27B's CLM scores 44.6 using 179 PFLOPs per trial against 42.3 and 437 PFLOPs for summarisation: the abstract's "5% higher with 59% fewer FLOPs". Subagents add nothing (44.2 at 181). With Claude 4.6 Sonnet, CLM reaches 51.0 against 42.3 (Figure 8). At a 128K budget the order changes: CLM 47.3, summarisation 47.8, CLM with subagents 50.2 (Figure 27).

On Software World, six GPT-5.6-Sol agents (272K context) jointly speed up requests, urllib3 and four downstream packages for over 24 hours and are scored on 17 held-out benchmarks from four packages they never see. At the same API spend the CLM swarm reaches a geometric-mean speedup of 1.044 against 1.026 for a summarising swarm: 4.4% against 2.6%, the "65% greater speedup" of the abstract (Figure 8). One run per swarm.

Steering, evolving and training it

One sentence steers it (Figure 9). Told to compact at Y = 16K, 24K or 32K tokens, Claude 4.6 Sonnet's median context at its first compaction is 16.0K, 23.6K and 30.9K. Told to compact at sub-question boundaries, the share of compactions within two turns of a boundary rises from 0.40 to 0.88. Told to back up the context before every edit, 0.68 of edits are preceded by a full backup (0.09 more by a partial one), against 0.00 without the instruction.

Evolved skills work (Figure 10, Figure 28). Starting from no context-management instruction, assisted evolution raises Qwen3.6-27B's development accuracy on KV Store from 22.3% to 83.8% (Log Triage 0.0% to 100.0%), and the selected KV Store skill lifts the held-out test score from 38.3% to 74.2%: the abstract's "up to 35.9 points", measured on one of the four tasks.

RL trains it (Table 2). Before training, Qwen3.5-9B's CLM scores 28.8% on BrowseComp-Plus, 5.9 points below the summary harness (34.7%). After 70 steps it scores 42.5% at 1.34 PFLOPs per question; the summary harness, trained the same way, scores 42.1% at 2.19. The abstract's "47.6% while using 12% fewer FLOPs" compares CLM with its own untrained start (42.5 against 28.8; 1.34 against 1.52 PFLOPs). Adding the FLOPs reward cut cost "without a clear loss in accuracy" for both (Figure 29).

The abstract says RL improves Qwen3.5-9B's CLM by 47.6% on BrowseComp-Plus. After training, how much more accurate is it than the summary harness trained with the same recipe?

Suffix Cache Reuse (Figure 11): on all 830 BrowseComp-Plus questions with Qwen3.6-27B, CLM served with SCR keeps 60.2% accuracy, the same as standard SGLang, at 7.14 against 10.98 measured PFLOPs per question: 65.0% of the compute, 35% less.

Why it matters beyond the paper

  • Context management moves from code to behaviour. In production harnesses the policy is code: Claude Code compacts at a threshold, and the Claude API's server-side compaction summarises when the prompt passes a trigger, 150,000 input tokens by default (the Context engineering page, citing the compaction docs). A CLM makes the policy something a prompt can steer and RL can train, and the paper's §6 frames harnesses as procedures that could later be distilled into weights (§6).
  • Serving has to stop assuming append-only. Prefix caching is built for transcripts that only grow. Any agent that edits or strips its history (and every reasoning model whose template drops old thinking) pays to re-prefill the tail; SCR, released as patches for SGLang and vLLM, is one answer (suffix_cache_reuse, read 19 October 2026).
  • A new attack surface. An editable context is one more place an injected instruction can persist across turns; §6 cites an OpenAI report of a model writing unauthorised instructions into its own compaction summary (§6; see Agent security).
Since the paper (dated: checked 26 October 2026)
  • arXiv still lists only v1 of the paper (29 September 2026) (arXiv 2609.37725, checked 26 October 2026).
  • It shipped into harnesses on day one. The README lists a CLM package for the Pi harness (pi install npm:@lolipopshock/pi-clm) and a community OpenCode port, opencode-clm, not maintained by the authors (README, read 19 October 2026).

Connections

  • Owning page: Context engineering, whose section 4 (Compaction, forced on purpose) cites this paper among the designs that manage context inside the model and records real Claude Code compactions call by call, so this page's replay focuses on what only this paper adds: the cost of an edit under prefix caching, and SCR.
  • Different mechanism, similar name: Latent Context Language Models compresses context into latent vectors with a trained encoder; it shortens the input before the decoder, while a CLM rewrites its own text.
  • The serving side: Batching, KV cache and scheduling in depth (why a cache hit is a prefix) and SGLang (the radix tree SCR patches).
  • The training side: DeepSeekMath (GRPO) and RL for LLMs.
  • Memory outside the context: Context engineering, section 8; Appendix A's distinction is by role, not storage: the context file is the next call's input, any other file is external memory.

How much of this to believe

What holds up.

  • The accounting. Every constant and every bar of the paper's FLOPs example reproduces from Eq. 7 to 9 (), the released metric uses the same constants, and every percentage in the abstract follows from the numbers in the figures and tables (the Tables tab shows each check).
  • The BrowseComp-Plus gap is outside the noise. 59.4% against 53.3% on 830 questions is a 6.1-point gap with a standard error of about points if the runs were independent (about standard errors; paired by question it would be tighter).
  • Like-for-like on the base model. Every zero-shot method uses the same model, budget and backbone, and the baselines run from released code. ContextBench gives every method a hand-written skill of comparable detail, so a baseline is not failing for want of instructions (Table 4). These are design choices in the paper's favour.
  • Limits the authors state. Gains depend on model ability (Appendix F), subagents add little on EdgeBench, SCR's savings come mostly from reasoning stripping, and safety is open. That candour counts for the paper.

What to discount.

  • CLM gets help the baselines do not. On BrowseComp-Plus, CLM's editing turns do not count toward the 100-turn limit, and when a request would overflow CLM alone rolls back and retries, up to six times (Appendix E). It also gets an editing reminder before the budget; the released BrowseComp-Plus configuration goes further, with nudges at 25%, 50% and 75% of the budget, an urgent nudge every turn past 90%, and a system prompt that teaches the prefix-cache cost model ("an edit forces everything after it to be re-read") (bcp.yaml, prompts.yaml). Part of the win may be the harness around the CLM, not the CLM.
  • One run per setting, no error bars on the main results (Figures 5 and 8, Tables 1 and 2); only the ContextBench pilot (four seeds a level), the steering study (bootstrap intervals) and the K sweep report uncertainty. TerminalBench 2.1 has 89 tasks, so one task is 1.1 points and the standard error near 53% is about 5.3 points: the TerminalBench and TBLite rankings are within noise. Table 1 is one best-of-run per method; Software World is one swarm per method, and its "65% greater speedup" is 4.4% against 2.6%.
  • The RL headline compares CLM with itself. +47.6% is against CLM's untrained start; against the summary harness trained the same way the gap is 0.4 points (standard error about 2.4), and the two arms had different budgets, turn counts and reward terms. The FLOPs saving (38.8%) is the solid part.
  • A result that changes sign across setups. Untrained Qwen3.5-9B on BrowseComp-Plus: 39.9% for CLM and 37.7% for summarisation in Figure 19, but 28.8% and 34.7% in Table 2 (the RL evaluation, 28K budget, 80 turns). In one setup CLM leads by 2.2 points, in the other it trails by 5.9. And in Figure 19 Self-Compact beats both, at a fraction of the cost.
  • Settings that disagree in three places (budget, turn cap, subagent count); none changes a conclusion, the readings are in the closed block below.
The settings that disagree, one by one

Settings that disagree. The main text gives BrowseComp-Plus a 32K limit; Appendix E a 23,560-token budget; the released configuration 28,672 tokens and a step budget of which "100, 500 and 2000 were all used". Figure 5's caption says a 100-turn cap; Appendix E gives TerminalBench 2.1 64 turns. EdgeBench subagents: "up to five" in §5.1.2, "up to six" in Appendix E.

  • Calculated, not measured, compute. The FLOPs are theoretical counts under an ideal prefix cache. The one measured server run cost about 1.9 times the calculated figure (a different run).
  • The authors built and graded the diagnostic. ContextBench is the authors' own benchmark, with skills they wrote for every method; CLM is near perfect on it. Fair as a diagnostic, weak as a headline.

Verdict. The design is simple, general and released, and the cost accounting is right. On the 27B model the BrowseComp-Plus gain is real at the 2 to 3 standard-error level; the rest of the accuracy claims are single runs on small suites with CLM-only harness help, and on the 9B model zero-shot CLM is not the best method. Use it when the model is strong; expect the dependable gain to be compute, not accuracy.

What it takes to use this

  • Code: facebookresearch/context-language-models, CC BY-NC 4.0, so non-commercial use only. It has the harness on Harbor (clm-harbor run -a clm-minimal), the BrowseComp-Plus and EdgeBench configurations, the FLOPs metric, the evolution loop, RL patches for the slime trainer, ContextBench runners, and SCR for SGLang and vLLM (read at commit 4831982, 13 October 2026).
  • Zero-shot needs only a capable model and Bash. Any OpenAI-compatible endpoint works; the paper's models were Qwen3.6-27B on vLLM, Claude 4.6 Sonnet, GPT-5.4 and GPT-5.6-Sol. A 9B model did not benefit zero-shot.
  • Training is expensive: the RL run used 64 H200s (16 for the policy, 48 for rollouts) for 70 steps of 256 trajectories each.
  • Serving: on a standard prefix cache, keep edits late and batched (the released prompt says so); SCR reclaims most of the re-prefill but is an approximation of exact attention.
  • Pays off on long horizons where a fixed summary loses facts (ContextBench) or a threshold fires at the wrong moment. Buys little when the task fits the window, or when the model is too weak to judge what to keep.