Reducing Token Usage of State-in-Context Agents using Minification
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
This paper presents a replication and extension of the recently introduced state-in-context agent framework. We independently re-implement the DirectSolve variant and evaluate it on the SWE-bench Verified benchmark. We report end-to-end full-benchmark results using GPT-5-mini and run selected ablations with GPT-4.1. In addition, we investigate a complementary research question: What is the impact of token-reducing input transformation strategies on the performance of software engineering agents? Based on a preliminary prompt analysis, we identify source code as the dominant contributor to token consumption. We therefore apply a series of code minification techniques that remove or shorten non-essential lexical elements while preserving program semantics. The proposed transformations are integrated into the agent and systematically evaluated. Experiments show that minification reduces average input token usage by 42% with a 12 percentage-point drop in resolution rate. These findings demonstrate that lightweight source code transformations can yield substantial efficiency gains while retaining a substantial fraction of the baseline performance, indicating a promising path toward more cost-effective agents. The full implementation is publicly available on GitHub: https://github.com/ipa-lab/minified-state-in-context-agent
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 8 of its 22 references that are in the map. First posted on arXiv 31 May 2026.
Builds on
8 of 22 references.
Closest ancestors · 1
Same direction, newest first
Other references · 7
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2025Are "Solved Issues" in SWE-bench Really Solved Correctly? An Empirical Studycited by 47
- 2025The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Managementcited by 40
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Remember, Don't Re-read: Stateful ReAct Agents for Token-Efficient Autonomous Experimentation
- 2026The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages
- 2026Token Reduction Is Not Cost Reduction
- 2026Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering
- 2026Beyond Token Savings: A Systematic Study of Context Compression in LLM Agents
- 2025Reducing Cost of LLM Agents with Trajectory Reduction
- 2026Constraint Decay: The Fragility of LLM Agents in Backend Code Generation
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring