Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Although effective, coding agents often incur substantial monetary costs. Their recurring cost-inefficient behaviors remain underexplored. We conduct the first study of behavioral cost inefficiencies in coding agents, analyzing 1,200 trajectories from Claude Code and Mini-SWE-Agent across four configurations on SWE-bench Verified. We identify three cost-inefficient behaviors: subsumed retrieval, similar script generation, and test re-execution. We then evaluate three mitigation strategies: structure-aware retrieval, agent-synthesized skills, and developer-designed skills, over 10k trajectories on held-out SWE-bench Verified and Pro tasks. Our main findings are: (1) The three behaviors affect 79.00%--98.00% of coding tasks and account for up to 22.75% of task cost. (2) Structure-aware retrieval can introduce retrieval overhead and alter agent delegation, causing inconsistent improvements in retrieval efficiency and cost increases of up to 28.14%. (3) Agent-synthesized skills tend to produce low-level, trace-specific guidance, limiting their effectiveness and generality. (4) In contrast, developer-designed skills provide high-level, trace-agnostic guidance, reducing cost by up to 41.73%, roughly twice the maximum gain from agent-synthesized skills.
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 40 of its 126 references that are in the map. First posted on arXiv 25 Sep 2026.
Builds on
40 of 126 references.
Closest ancestors · 14
Same direction, newest first
- 2026ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair2 Jul
- 2026SkillMOO: Multi-Objective Optimization of Agent Skills for Software Engineering10 Apr
- 2026Coherence Collapse: Diagnosing Why Code Agents Fail After Reaching the Right Code25 Mar
- 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agents23 Jan
- 2026Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering20 Jan
- 2025Process-Centric Analysis of Agentic Software Systems2 Dec
- 2025Understanding Code Agent Behaviour: An Empirical Study of Success and Failure Trajectories31 Oct
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agents19 Oct
- 2025Reducing Cost of LLM Agents with Trajectory Reduction28 Sep
- 2025AgenTracer: Who Is Inducing Failure in the LLM Agentic Systems?3 Sep
- 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
- 2025Understanding Automated Program Repair Agents Through the Lens of Traceability: An Empirical Study10 Jun
2 more
Other references · 26
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 633
- 2026SkillRL: Evolving Agents via Recursive Skill-Augmented Reinforcement Learningcited by 252
- 2025SkillWeaver: Web Agents can Self-Improve by Discovering and Honing Skillscited by 174
- 2026Trace2Skill: Distill Trajectory-Local Lessons into Transferable Agent Skillscited by 161
- 2023An Empirical Study of the Non-determinism of ChatGPT in Code Generationcited by 134
- 2024Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluationscited by 130
- 2024Concise Thoughts: Impact of Output Length on LLM Reasoning and Costcited by 108
- 2026EvoSkill: Automated Skill Discovery for Multi-Agent Systemscited by 96
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 88
- 2026XSkill: Continual Learning from Experience and Skills in Multimodal Agentscited by 71
14 more
- 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 62
- 2025SelfBudgeter: Adaptive Token Allocation for Efficient LLM Reasoningcited by 47
- 2026SkillForge: Forging Domain-Specific, Self-Evolving Agent Skills in Cloud Technical Supportcited by 43
- 2025Budget-Aware Tool Use Enables Effective Agent Scalingcited by 42
- 2025Cost-of-Pass: An Economic Framework for Evaluating Language Modelscited by 35
- 2026MetaClaw: Just Talk -- An Agent That Meta-Learns and Evolves in the Wildcited by 35
- 2024Towards Optimizing the Costs of LLM Usagecited by 33
- 2026ARISE: Agent Reasoning with Intrinsic Skill Evolution in Hierarchical Reinforcement Learningcited by 28
- 2026How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Taskscited by 28
- 2025Beyond the Final Answer: Evaluating the Reasoning Trajectories of Tool-Augmented Agentscited by 20
- 2025AgentTTS: Large Language Model Agent for Test-time Compute-optimal Scaling Strategy in Complex Taskscited by 16
- 2026Compressing Code Context for LLM-based Issue Resolutioncited by 12
- 2025The Hidden Cost of Readability: How Code Formatting Silently Consumes Your LLM Budgetcited by 11
- 2025Stop Wasting Your Tokens: Towards Efficient Runtime Multi-Agent Systemscited by 11
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Prompt-Induced Waste in Coding Agents: Reasoning, Effort, Harness Design, and End-to-End Cost
- 2026Coding Agents are Strong Prompt Optimizers
- 2026Beyond Resolution Rates: Behavioral Drivers of Coding Agent Success and Failure
- 2026Can your AI agent be cheaper? Investigating the effects of task specifications on token spend in agentic coding tasks
- 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks
- 2026Token Reduction Is Not Cost Reduction
- 2026EvoCode-Bench: Evaluating Coding Agents in Multi-Turn Iterative Interactions
- 2026Code Isn't Memory: A Structural Codebase Index Inside a Coding Agent