Shorter contexts and LLMs editing neural network weights

Agents in Practice #18 on keeping agent contexts short with compaction and selective reading, and using LLMs to inspect and edit neural network weights.
llm
agents
agents-in-practice
Author

Ryan Lee

Published

November 7, 2026

Welcome to the 18th issue of Agents in Practice. I will be in London next week: if you are in the area, please reach out to me and we can meet up!

📬 Agents in Practice is a weekly newsletter on agentic AI research and applications. Subscribe here →

You don’t need long context

The burden of long context

Researchers from NVIDIA studied whether LLM agents need to keep their entire conversation history in context. They compared retaining the full history with periodically replacing it with a compact record of the task, current progress, and information needed for the next steps.

Across six benchmarks covering coding, information retrieval, and tool use, Claude Opus 4.5 and GPT 5.6 Sol generally maintained similar accuracy with smaller context windows. For tasks with long input documents, the authors stored the documents in files and let agents read selected portions using Bash tools. Across seven long-input benchmarks, this generally matched or improved accuracy over supplying the full input.

The authors also tried compacting after every action on SWE-bench Verified and Terminal-Bench 2.1. Median peak context across tasks was only 7,000 to 9,000 tokens, depending on the model and benchmark. Claude Opus 4.5 matched or improved on its full-history baseline, while GPT 5.6 Sol lost 2.0 and 3.3 percentage points on the two benchmarks, respectively.

Personal Thoughts

Context management and compaction have been my research topic recently, and compaction seemed like a very arbitrary design choice to me, especially when set to match the maximum context length. I wonder if this will bring a “stateless” design to LLM agents, where the agent can be restarted at any time without losing any context.

Read more

LLMs editing neural network weights

Weight-Space Programming

Researchers from MIT CSAIL demonstrated that an LLM can reason about neural network weights and edit them directly without gradient descent. Their experiments used GPT-6 Astra to inspect trained networks, repair failures, and write new networks from scratch. The authors call this “Weight-Space Programming.”

For three MinAtar (miniature Atari 2600) games, Astra received the game rules and source code, plus the network’s input and output layouts. It wrote the weights without tools or playing the games, and the resulting networks outperformed the authors’ PPO baselines trained for 100 million steps.

In a larger experiment, Astra used Python to inspect and edit Qwen3.5-0.8B, with access to practice problems for testing its changes. Editing 0.016% of the weights raised MATH-500 accuracy from 7.9% to 48.1% under the same sampling settings. The authors attributed the gains to reducing repetitive reasoning loops that often prevented the original model from finishing an answer. They also tried a model that rarely looped, Gemma 3 270M, but found no clear improvement in math performance.

Personal Thoughts

Most people I know seem to have more interest in the second result where Astra edited Qwen, but as a former RL person, I find the first result more interesting. There are various RL models that are known to be brittle and hard to train, and the idea of using LLMs to inspect and edit them directly is very appealing. That said, an ablation study with an unknown environment or architecture will be necessary, as it is unclear if this actually generalizes to unsolved problems.

Read more

One-liners

Subscribe to Agents in Practice

Get new issues of Agents in Practice — a newsletter summarizing exciting new research and applications in agentic AI — delivered to your inbox.