mlsanityData to 14 Oct 2026

Remember, Don't Re-read: Stateful ReAct Agents for Token-Efficient Autonomous Experimentation

arXiv 2606.14945 ↗First posted 12 Jun 2026cs.LGcited by 1

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

The autoresearch pattern enables autonomous experimentation by having a large language model (LLM) iteratively modify code to optimize a target metric. Its stateless design, however, reconstructs experimental context from scratch at every iteration, incurring O(n) token cost per iteration and O(n2) total. This work reformulates the pattern as a stateful ReAct agent using LangGraph, where typed persistent state carries experimental history across iterations via a tool-calling interface. Two benchmarks are evaluated: hyperparameter tuning (15 iterations, small per-iteration observations) and code performance optimization (40 iterations, large per-iteration observations containing full source code and benchmark results). On hyperparameter tuning, the stateful agent consumes 90% fewer tokens (2,492 vs. 24,465). On code optimization, the stateful agent consumes 52% fewer tokens (627K vs. 1,275K) while achieving comparable optimization quality on both tasks. The token reduction is structural: the stateless agent re-reads the full history at O(n) cost per iteration, while the stateful agent operates within a fixed-size conversation window at O(1) cost. This paper describes the architecture in sufficient detail for practitioners to implement a stateful autoresearch agent for their own workflows.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 12 of its 15 references that are in the map. First posted on arXiv 12 Jun 2026.

Builds on

12 of 15 references.

References · 12

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  2. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  3. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
  4. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
  5. 2024The AI Scientist: Towards Fully Automated Open-Ended Scientific Discoverycited by 1,071
  6. 2023Cognitive Architectures for Language Agentscited by 429
  7. 2025Agent Laboratory: Using LLM Agents as Research Assistantscited by 425
  8. 2025The AI Scientist-v2: Workshop-Level Automated Scientific Discovery via Agentic Tree Searchcited by 422
  9. 2023MLAgentBench: Evaluating Language Agents on Machine Learning Experimentationcited by 366
  10. 2025AIDE: AI-Driven Exploration in the Space of Codecited by 226
  11. 2024Large Language Model Agent for Hyper-Parameter Optimizationcited by 64
  12. 2025On the Failure of Latent State Persistence in Large Language Modelscited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Stateless Language Agents: Scaling Long-Horizon Automated Research
  2. 2024StateAct: Enhancing LLM Base Agents via Self-prompting and State-tracking
  3. 2026Reducing Token Usage of State-in-Context Agents using Minification
  4. 2026The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages
  5. 2026EvoCode-Bench: Evaluating Coding Agents in Multi-Turn Iterative Interactions
  6. 2025From Reproduction to Replication: Evaluating Research Agents with Progressive Code Masking
  7. 2026SWE-Cycle: Benchmarking Code Agents across the Complete Issue Resolution Cycle
  8. 2026Schr"odinger's Code Repository: Have LLMs Learned SWE-bench or Memorized It?