Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agents

Yiran Hu, Nan Jiang, Shanchao Liang, Anik Dey, Yi Wu +1 more
9/25/2026
cs.AIcs.SE

No confident code implementation found for this paper.

Abstract

Although effective, coding agents often incur substantial monetary costs. Their recurring cost-inefficient behaviors remain underexplored.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hu2026analyzing,
  title  = {Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agents},
  author = {Yiran Hu and Nan Jiang and Shanchao Liang and Anik Dey and Yi Wu and Lin Tan},
  year   = {2026},
  eprint = {2609.30725},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.30725v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.30725.svg)](https://codeofpaper.com/paper/2609.30725)

Discussion