Where Should LLM Agents Adapt at Test Time? In Context, in Weights, or Both
On the map: LLM reasoning → Reasoning for agents, planning and code also fits: Reinforcement learning for reasoning
also in 1 more
Abstract (arXiv)
LLM agents operating repeatedly in the same environment, such as a code repository, a database, or an application suite, encounter tasks that share latent structure. Experience can reveal this structure, allowing agents to reuse environment knowledge and learn from environmental feedback. Agents can adapt at test-time using this experience through two channels: retaining it in context and updating their weights. These channels are usually studied separately, leaving unclear what each contributes and when they complement each other. We compare in-context learning (ICL), reinforcement learning with verifiable rewards using GRPO, and self-distillation using SDPO, alone and in combination, using a shared online protocol and modular framework. Agents encounter matched task streams, are evaluated on each task before adapting to it, and learn only from their own attempts and environment feedback. We evaluate 14 adaptation mechanisms and a stateless baseline with Qwen3.5-9B on 109 tasks from four environments drawn from SWE-bench Verified, AppWorld, ScienceWorld, and BIRD-Critic-SQLite, using five task orders per environment. ICL provides the largest standalone gain: its best policy raises mean success across environments from 28.8% to 49.4%. Adding GRPO to this policy achieves the highest mean success, 51.6%. While adding GRPO improves the overall mean under every ICL policy, SDPO has mixed effects. Trace analyses show fewer lookups and shorter attempts under ICL, consistent with reusing knowledge of the shared structure. However, ICL also frequently skips inspection and verification for the current task. Adding GRPO to ICL helps restore these behaviors while preserving its reduced environment lookups. These observations suggest that reinforcement learning with verifiable rewards can refine how agents use retained experience, motivating the joint study of context management and weight updates.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 51 of its 58 references that are in the map. Submitted 15 Nov 2026.
Builds on
51 of 58 references.
Closest ancestors · 2
Same direction, newest first
- 2025ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory29 Sep
- 2025Agent Lightning: Train ANY AI Agents with Reinforcement Learning5 Aug
Other references · 49
- 2017Proximal Policy Optimization Algorithmscited by 16,156
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 10,542
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,789
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,841
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,483
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 2,255
- 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 709
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 699
- 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Modelscited by 530
- 2024AppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agentscited by 510
- 2024Agent Workflow Memorycited by 482
37 more
- 2024AgentBoard: An Analytical Evaluation Board of Multi-turn LLM Agentscited by 400
- 2026Reinforcement Learning via Self-Distillationcited by 398
- 2022ScienceWorld: Is your Agent Smarter than a 5th Grader?cited by 370
- 2025TTRL: Test-Time Reinforcement Learningcited by 303
- 2024Continual Learning of Large Language Models: A Comprehensive Surveycited by 262
- 2026On-Policy Context Distillation for Language Modelscited by 228
- 2025Evo-Memory: Benchmarking LLM Agent Test-time Learning with Self-Evolving Memorycited by 154
- 2025EvolveR: Self-Evolving LLM Agents through an Experience-Driven Lifecyclecited by 150
- 2025Memento: Fine-tuning LLM Agents without Fine-tuning LLMscited by 140
- 2026Learning to Discover at Test Timecited by 134
- 2024The Surprising Effectiveness of Test-Time Training for Few-Shot Learningcited by 106
- 2026MemoryArena: Benchmarking Agent Memory in Interdependent Multi-Session Agentic Taskscited by 104
- 2023Test-Time Training on Nearest Neighbors for Large Language Modelscited by 96
- 2025End-to-End Test-Time Training for Long Contextcited by 78
- 2017Dynamic Evaluation of Neural Sequence Modelscited by 59
- 2025Test-Time Learning for Large Language Modelscited by 55
- 2024StreamBench: Towards Benchmarking Continuous Improvement of Language Agentscited by 51
- 2024Fine-Tuning and Prompt Optimization: Two Great Steps that Work Better Togethercited by 48
- 2025On the generalization of language models from in-context learning and finetuning: a controlled studycited by 47
- 2026SIA: Self Improving AI with Harness & Weight Updatescited by 40
- 2026Online Experiential Learning for Language Modelscited by 36
- 2025Self-Improving LLM Agents at Test-Timecited by 31
- 2026Continual Learning Bench: Evaluating Frontier AI Systems in Real-World Stateful Environmentscited by 30
- 2026WHALE: A Simple Recipe for Joint Harness-Weight Optimizationcited by 23
- 2026Exploratory Memory-Augmented LLM Agent via Hybrid On- and Off-Policy Optimizationcited by 22
- 2026When Continual Learning Moves to Memory: A Study of Experience Reuse in LLM Agentscited by 22
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 18
- 2026Experiential Reflective Learning for Self-Improving LLM Agentscited by 18
- 2025Learning on the Job: Test-Time Curricula for Targeted Reinforcement Learningcited by 14
- 2026Learning, Fast and Slow: Towards LLMs That Adapt Continuallycited by 12
- 2026Position: Modular Memory is the Key to Continual Learning Agentscited by 10
- 2026When Does Continual Learning Require Learningcited by 9
- 2025Specialization after Generalization: Towards Understanding Test-Time Training in Foundation Modelscited by 7
- 2026Learning While Acting: A Skill-Enhanced Test-Time Co-Evolution Framework for Online Lifelong Learning Agentscited by 7
- 2026EasyOPD: An Easy-to-use On-Policy Distillation Framework for Large Language Modelscited by 4
- 2026CLaaS: Continual learning as a service for sample efficient online learningcited by 2
- 2026ASCENT: Online Test-Time Training of Long-Horizon Agents via Self-Distillation of Verified Experiencecited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Test-Time Adaptation for LLM Agents via Environment Interaction
- 2026Unified Context Evolution for LLM Agents
- 2026Decocted Experience Improves Test-Time Inference in LLM Agents
- 2026Skills on the Fly: Test-Time Adaptive Skill Synthesis for LLM Agents
- 2026From Task Solving to Robust Real-World Adaptation in LLM Agents
- 2026ContinualSkillBench: Can LLM Agents Truly Evolve Their Capabilities?
- 2026When Successful Strategies Fail: Adaptation to Environmental Novelty in Terminal Agents
- 2026No Time Like the Present: Agentic Test-Time Training for LLM Agents