Can you make an AI agent better at remembering what matters, just by changing the system around it?
Can context management be optimized for an agent without retraining or changing the model?
This explores whether you can improve how an agent handles its context window (what it keeps, drops, summarizes and re-reads) by changing the system around the model rather than the model's weights.
This explores whether you can improve how an agent handles its context window by changing the system around the model instead of its weights. The corpus says yes, and there are several distinct ways to do it. The most direct is to give a frozen agent an outside context manager. Can an external manager handle context for frozen agents? trains a separate RL-based manager to decide what to prune and what to preserve, while the agent itself never changes. The manager has to be tuned to the agent it serves. Stronger agents do better when context is preserved in high fidelity, and weaker agents need aggressive compression. So good context management is specific to the agent, not a universal recipe.
You can also improve it in the harness, the scaffolding around the model, with no learned component at all. Can agent harnesses be automatically optimized across many environments? ran automated search across many environments and found four mechanisms (action execution, context compaction, observation handling, delegated reading). Together they cut token traffic by roughly 45–49% with comparable performance on a 51-task benchmark. [[harness-scaling-lifts-fixed-models-on-terminal-bench-21-without-touching-weights]} shows the same idea on accuracy. Optimizing the execution system around frozen weights lifted several models on Terminal-Bench 2.1, and the same runbook carried over to newer models unchanged. That suggests harness gains and model gains add together instead of competing.
A third route is to stop treating the context window as the place where the task's state lives. Can task state management alone improve long-horizon agent performance? moved task state out of the executor and checked it with independent environment audits instead of trusting the agent's own claims. Qwen 3.7-Plus went from 51.8% to 80.7% on WeaveBench with no model change. Memory works similarly. Can agents learn continuously from experience without updating weights? has agents improve through case, subtask and tool memories rather than gradient updates, reaching 87.88% on GAIA validation. Can agents reconstruct memory on demand instead of retrieving it? goes further and rebuilds memory on demand by traversing a graph as evidence accumulates. It gains up to 23% on reasoning tasks and costs fewer tokens than a fixed retrieve-then-reason pipeline.
The cheapest lever is often the wording and structure of the context itself. Can context quality alone predict how agents will behave? held the model fixed and varied only the context. Scores across seven criteria (role clarity, guardrails, instruction consistency, tool schemas, grounding, injection hardening, token efficiency) predicted matching behavioral successes and failures. So you can audit context quality before you ever run the agent. If you also want to adapt while deployed, Can agents adapt without pausing service to users? describes injecting skills from failures within seconds and with zero downtime, and saves the slower weight updates for idle windows.
The limit is that the most active form of context management, learning to delegate subtasks to subagents and integrate their summaries, is trained. Can delegation teach models to manage context more actively? found that delegation training beats passive compression and transfers to single-agent tasks, which suggests it teaches disciplined decomposition, not just orchestration. So the no-retraining options above mostly get you better bookkeeping (what to keep, where state lives, what to re-read). Learned delegation may be what gets you an agent that manages its own attention.
Sources 9 notes
AdaCoM trains an external RL-based manager to prune and preserve context for frozen agents. The key finding: stronger agents benefit from high-fidelity preservation, while weaker agents need aggressive compression—optimal context management is agent-specific, not task-universal.
Cross-environment harness optimization yielded four mechanisms (action execution, context compaction, observation handling, delegated reading) that reduced token traffic by 44.7–49.0% while maintaining comparable performance on a 51-task benchmark, suggesting harness-level gains are orthogonal to model improvements.
StateM improves Terminal-Bench 2.1 accuracy across multiple models by optimizing execution systems around frozen weights. The same runbook transfers to newer models without modification, achieving 95.3% on GPT-5.6 and lifting DeepSeek-V4 Flash by 5.4 points.
Separating task state management from execution, using independent environment audits instead of trusting executor claims, improved Qwen 3.7-Plus from 51.8% to 80.7% on WeaveBench. The same model-harness pair showed consistent gains across multiple benchmarks and task types.
AgentFly formalizes agent learning as a Memory-augmented MDP with three memory modules (case, subtask, tool) that enable credit assignment and policy improvement entirely through memory operations. The approach achieved 87.88% on GAIA validation without modifying LLM parameters.
Show all 9 sources
MRAgent achieves up to 23% gains on reasoning tasks by reconstructing memory through active graph traversal that prunes paths based on accumulated evidence, while reducing token and runtime cost compared to fixed-retrieval pipelines.
A controlled study varying only context while holding the model fixed found that context quality—measured across seven criteria (role clarity, guardrails, instruction consistency, tool schemas, grounding, injection hardening, token efficiency)—consistently predicted matching behavioral failures and successes.
MetaClaw demonstrates that deployed agents require both rapid skill injection from failures (seconds, zero downtime) and slower gradient-based optimization during idle windows (minutes to hours). The two mechanisms reinforce each other, with better policies producing more informative failures and richer skills enabling higher-reward trajectories.
SearchSwarm shows that training models to delegate subtasks and integrate summarized results beats passive compression, with a 30B model matching much larger ones. Critically, the delegation skill transfers to single-agent tasks, suggesting it teaches disciplined decomposition and evidence grounding, not just orchestration.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Learning Agent-Compatible Context Management for Long-Horizon Tasks
- AutoLab: Can Frontier Models Solve Long-Horizon Auto Research and Engineering Tasks?
- From Model Scaling to System Scaling: Scaling the Harness in Agentic AI
- AgentFly: Fine-tuning LLM Agents without Fine-tuning LLMs
- ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory
- Useful Memories Become Faulty When Continuously Updated by LLMs
- Know It, Act on It: Investigating Memory Utilization in LLM Personalization
- SearchSwarm: Towards Delegation Intelligence in Agentic LLMs for Long-Horizon Deep Research