Small AI agents learn to keep working notes in plain files

A preprint from Peking University, JD.com and others trains 4B and 9B models to save their progress in ordinary files during long tasks. Teaching memory through familiar file commands worked better than teaching purpose-built memory tools.

6 min readIIBenchmarkedPreprint, not peer reviewed
Save
A still life showing a string winding from a small wooden spool to a paper file containing blue-clipped cards.AI illustration
Illustration: AI generated

What the study shows

Language models can only see a limited amount of text at once, called the context window. On long agent tasks, such as fixing a bug over dozens of steps, early findings fall out of that window. The agent then has to decide what to write down and what to read back later.

The authors built a test suite called CAMG-II with five kinds of long task: multi-step online shopping, software repair, machine-learning experiments, business document work and website building. In every task the agent can run ordinary shell commands and keep files in a workspace that lasts the whole episode. When the context fills, it is wiped. Before that happens, the agent must write a short continuation file, and afterwards it gets only that file's location.

Their training method, CAMP-II, uses on-policy distillation: the small student model acts, and a larger frozen teacher model scores every word the student wrote, including the notes. No task rewards are used. The students were Qwen3.5 models with 4 billion and 9 billion parameters, and the teacher a 27 billion parameter Qwen model.

The authors report that the trained 4B model succeeded on about 65% of 640 test tasks on average. The untrained model managed about 45%, and an earlier version trained on task rewards alone about 54%. Five other memory methods, trained with the same teacher, all scored lower. Five repeat training runs gave almost the same average.

Two checks point to the notes as the source of the gain. Replacing plain files with dedicated memory tools, or with automatic summaries of the conversation, cost about 16 points. Switching off the training signal on the note-writing words alone removed most of the gain, while switching it off on the same number of random words did not.

On two outside coding and terminal benchmarks, the trained 4B model gained about 7 points on each over its starting model. The trained 9B model beat a larger 35B model from the same family on both. This is a preprint and has not been peer reviewed. Code is promised but not yet released. On our readiness scale it sits at level II, Benchmarked: there are public benchmark results, but no released code or documented production use.

Our reading

In our reading, the useful idea here is about the interface, not the training maths. Teaching memory through an action that both teacher and student already perform well gives the teacher something it can judge and the student something it already tries. The authors back this with measurements taken before training: the student reached for files about three times as often as for dedicated memory tools, and the teacher was better at telling a relevant note from an irrelevant one when notes were files.

A concrete case from the paper shows what this looks like. A coding agent fixing a bug writes down the function, the line and the suspected faulty condition before its context is wiped. Afterwards it reads the note back and carries on from that line, and the fix passes the tests. For a team running agents on long support tickets or code reviews, this is the kind of hand-off that decides whether the agent starts over or finishes.

The results deserve caution. Most comparisons are on the authors' own environments, the headline numbers for the baselines come from single runs, and 128 tasks per domain leaves room for noise between close methods. The trained student still falls well short of its teacher on coding and business tasks.

Free membership

Read the rest of this story

Membership is free. You get every article in full and the Issue every Sunday.

We send a sign-in link, no password needed. Already a member? Sign in

Readiness assessment

II
Benchmarked
LevelStatusEvidence
I  Lab onlyMetResearch prototype with a training method, new environments and ablations.
II  BenchmarkedMetResults on two public benchmarks, Terminal-Bench 2.1 and SWE-Bench Pro V2, plus the authors' own CAMG-II suite. CAMP-II-4B beats its base model on both outside benchmarks, and CAMP-II-9B beats the larger 35B model. These are the authors' own runs, with no independent replication.
III  Open sourceNot yetThe appendix says 'Code will be released with the camera-ready version.' No code, weights or data link is given in the paper.
IV  In productionNot yetNo named organisation reports using it in production. The authors are affiliated with JD.com, but no deployment is described.

What would move it up
Releasing the code, environments and trained 4B and 9B weights would move it to level 3. Independent replication on public benchmarks, with task counts and error bars, would firm up level 2. Documented use by a named organisation in a real long-running agent would be needed for level 4.

Checked automatically every week, last on 16 November.

The study

Lirui Luo, Kelong Mao, Xinwei Yang et al.. Coding Agent Memory Post-Training II: Unlocking the Memory Potential of Pre-trained File Operations for Long-Horizon Tasks via On-Policy Distillation. arXiv, 10 November 2026. doi:10.48550/arxiv.2611.14009

Preprint, not peer reviewed · Licence arXiv (no reuse) · Peking University, Beijing · Jingdong (China), Beijing · Sichuan University, Chengdu

Notes

  1. Luo et al., Coding Agent Memory Post-Training II, arXiv preprint 2611.14009, 10 November 2026. Not peer reviewed. Source
  2. Code availability: the paper states code will be released with the camera-ready version. No link is given.
  3. Main results (Table 1), average success on CAMG-II test set: untrained Qwen3.5-4B 45.3%, CAMP-I 54.2%, MemOPD with SFT 51.8%, CAMP-II-4B 64.6%, CAMP-II-9B 66.5%, frozen Qwen3.8-27B teacher 76.0%. Five seeds of CAMP-II-4B: 64.9% ± 0.5 (Table 8).
  4. Ablations (Figure 7): memory tools 48.2%, compaction 48.2%, loss masked on memory tokens 47.3%, random tokens masked 63.3%.
  5. Interface measurements: memory actions as share of all actions, 21.6% files, 7.8% memory tools, 5.9% compaction (Figure 3b). Teacher picks correct note in 76.5%, 70.0% and 63.8% of decisions (files, compaction, memory tools).
  6. External benchmarks (Table 2): Terminal-Bench 2.1 and SWE-Bench Pro V2, network-free subsets. Qwen3.5-4B 23.1 and 11.2; CAMP-II-4B 30.0 and 18.1; Qwen3.5-35B-A3B 33.8 and 27.4; CAMP-II-9B 38.0 and 30.1.
  7. Readiness: level II, Benchmarked. Public benchmark results reported by the authors; no released code or weights; no named production use.

Edited and signed by

Stefan PerdalEditor and publisher86 stories edited

Stefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.

How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

More on Agents