mlsanityData to 7 Oct 2026

The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages

arXiv 2607.22807 ↗First posted 24 Jul 2026cs.SE cs.CLcited by 1

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

Abstract (arXiv)

Although coding agents are now very effective in a variety of programming languages, this paper first shows that the cost (in tokens) can very significantly by programming language. We evaluate five recent models on programming problems in Python, Java, Rust, and OCaml. We carefully control for problem difficulty, and show that there can be stark variation in token consumption that is consistent across models. To understand why, we analyze both the structure and content of agent trajectories. First, we re-execute every intermediate solution and abstract each trajectory as a sequence of test-outcome vectors, then label the work between successive solutions. This reveals agents repeatedly producing noncompiling solutions in unfamiliar languages and revising solutions that already pass. Second, we analyze trajectory text, finding that agents plan solutions in code comments, distrust the provided tests in favor of inputs they invent, and sidestep unfamiliar target languages by prototyping in Python. Our results show that by-language token efficiency is a metric that should be considered when benchmarking and developing multilingual agents, and, for the tokenmaxxer, a guide to the most expensive language to work in.

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

Builds on

23 of 34 references.

Closest ancestors · 11

Same direction, newest first

  1. 2026Frontier Coding Agents Use Metaprogramming to Adapt to Unfamiliar Programming Languages9 Jun
  2. 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositories5 Jun
  3. 2026GLM-5: from Vibe Coding to Agentic Engineering17 Feb
  4. 2026ContextBench: A Benchmark for Context Retrieval in Coding Agents5 Feb
  5. 2026Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering20 Jan
  6. 2026EET: Experience-Driven Early Termination for Cost-Efficient Software Engineering Agents9 Jan
  7. 2025Process-Centric Analysis of Agentic Software Systems2 Dec
  8. 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agents19 Oct
  9. 2025Reducing Cost of LLM Agents with Trajectory Reduction28 Sep
  10. 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
  11. 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr

Other references · 12

  1. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  2. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  3. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,107
  4. 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
  5. 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
  6. 2026How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Taskscited by 28
  7. 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
  8. 2025The Hidden Cost of Readability: How Code Formatting Silently Consumes Your LLM Budgetcited by 11
  9. 2025CodeAgents: A Token-Efficient Framework for Codified Multi-Agent Reasoning in LLMscited by 9
  10. 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environmentcited by 5
  11. 2025Token Sugar: Making Source Code Sweeter for LLMs through Token-Efficient Shorthandcited by 3
  12. 2026Multi-LCB: Extending LiveCodeBench to Multiple Programming Languagescited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Latent Programming Horizons in Coding Agents
  2. 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agents
  3. 2025SWE-PolyBench: A multi-language benchmark for repository level evaluation of coding agents
  4. 2026FormulaCode: Evaluating Agentic Optimization on Large Codebases
  5. 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities
  6. 2025SWE-Compass: Towards Unified Evaluation of Agentic Coding Abilities for Large Language Models
  7. 2026Do programming languages still matter to your AI coding agent teammate? Evidence at scale from chess engines
  8. 2025FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migration