Toward Sustainable Agentic AI: Carbon Tradeoffs Across Iterative Self-Refinement and Tool-Augmented Coding

Boris Ruf, Adrien de Mailly Nesle, Marcin DetynieckiarXiv 2026

TL;DR

Agentic AI strategies like iterative self-refinement and tool use can make small models perform like flagships, but they come with a steep environmental price tag. This paper reveals that while three rounds of self-refinement can close a 16-point accuracy gap between a "mini" and a "large" model, it nearly triples the carbon footprint of the smaller model in the process.

What Problem Does This Paper Address?

The AI community is currently obsessed with "agentic" workflows—systems where a Large Language Model (LLM) doesn't just give a one-shot answer but iterates on its work, critiques its own logic, or uses external tools (like a code compiler) to solve problems. While we know these methods boost accuracy, we have very little data on their environmental sustainability.

Most benchmarks focus on accuracy or monetary cost. This paper addresses the "carbon tradeoff": how much extra CO2 are we emitting when we ask an agent to "think" longer or try multiple times? As agentic systems become the standard for complex tasks like software engineering, understanding this footprint is essential for responsible deployment.

Methods

The authors conducted two empirical studies to track energy and carbon footprints:

  1. Study 1: Iterative Self-Refinement. They tested GPT-4.1-mini on math problems, forcing it through $k=1$ to $5$ steps (Solve $\rightarrow$ Critique $\rightarrow$ Revise). They compared this against a single-pass baseline of the much larger GPT-4.1.
  2. Study 2: Tool-Augmented Coding. They used the OpenHands framework to let agents (GPT-4.1-mini, Claude Opus 4.6, and GPT-5.3-codex) solve real-world GitHub issues. These agents operated in Docker containers, using bash and file-editing tools.

To estimate carbon, the researchers used a methodology that combines model-specific electricity factors (kWh per token) with regional grid carbon intensities (Ireland for Study 1, Sweden for Study 2) and embedded carbon from hardware manufacturing.

Datasets

  • MATH Dataset: Specifically Levels 3–5, used to evaluate multi-step reasoning.
  • SWE-bench Lite: A curated subset of 300 real GitHub issues from popular Python repositories (like Django and scikit-learn). This is the gold standard for evaluating "agentic" software engineering.

Key Insights and Ideas

  • The "Efficiency Frontier" for Refinement: In Study 1, the authors found that accuracy plateaus quickly. Moving from $k=1$ to $k=3$ provides a massive boost, but $k=4$ and $k=5$ often add carbon without any measurable gain in correctness.
  • Capability vs. Sustainability Divergence: In coding tasks, the most capable model (GPT-5.3-codex) was not the most carbon-efficient per task. However, "cheaper" models like GPT-4.1-mini often failed more frequently and iterated longer, accumulating massive amounts of "prompt context" that current carbon accounting often ignores.
  • The Prompt Token Iceberg: In agentic loops, the "context" (previous attempts, tool outputs) grows exponentially. By the end of a coding task, prompt tokens can make up over 99% of the total token count. Since many current carbon estimates only look at output tokens, we are likely significantly underestimating the true footprint of agents.
Figure 3: Token composition shows that as refinement steps (k) increase, the share of prompt tokens grows significantly, accounting for up to 73% of the workload in Study 1 and over 99% in Study 2.

Key Results

  • Closing the Gap: In the MATH benchmark, GPT-4.1-mini at $k=3$ reached 59% accuracy, nearly matching the 60% score of the flagship GPT-4.1. However, this $k=3$ setting emitted 2.8x more carbon than the single-pass mini model.
  • Carbon-Accuracy Crossover: Carbon emissions rise linearly with each refinement step. For GPT-4.1-mini, the carbon cost exceeds the "upgrade cost" (the footprint of just using a larger model in one shot) once you hit $k=5$.
Figure 1: Accuracy, cost, and carbon vs. k. Note how carbon (c) rises monotonically even after accuracy (a) plateaus at k=3.
  • Coding Performance: GPT-5.3-codex was the clear winner in capability, resolving 81.2% of tasks. While GPT-4.1-mini was the most "carbon-efficient" per resolved task (511 mgCO2e), it only solved 25% of the problems, suggesting that for hard tasks, "cheap" models may simply be inadequate regardless of how many iterations they are given.
Figure 2: Study 2 results showing that while GPT-4.1-mini uses the most tokens per resolved task (a), its lower energy intensity makes it the lowest carbon emitter per task (c).

Limitations and Future Work

The authors are transparent about several "lower bound" limitations:

  • Output-Only Accounting: The carbon estimates primarily cover output tokens. Including the energy required to process the massive prompt contexts in agentic loops would likely flip some of the efficiency rankings.
  • Tool Execution: The energy used by the Docker containers, test runners, and compilers was not measured. In real-world software engineering, running a massive test suite might consume as much energy as the LLM inference itself.
  • Sample Size: Study 2 was limited to ~50 instances per model due to the high cost of running these agents. Larger-scale studies are needed to confirm these trends across diverse repositories.

The next step for the field is "prompt-inclusive" accounting and direct energy measurements on open-source models to get a high-fidelity view of the agentic footprint.

Summary updated

Abstract

Agentic language model systems can improve performance either by iterating on their own outputs or by using external tools in grounded environments. While these strategies can reduce error rates and substitute for larger models in some settings, their environmental cost remains relatively underexplored. We present two complementary empirical studies that estimate the energy and carbon footprint of agentic AI across settings of increasing complexity. Study~1 evaluates iterative verbal self-refinement: GPT-4.1-mini at $k = 1$--$5$ steps versus a GPT-4.1 single-pass baseline on two MATH benchmark splits. Study~2 evaluates tool-augmented agentic coding: GPT-4.1-mini, Claude Opus~4.6, and GPT-5.3-codex on SWE-bench Lite, where agents operate inside Docker-isolated environments with access to code execution and file editing tools. In Study~1, $k=3$ refinements close a 16-percentage-point accuracy gap to within 1~point, but nearly triple the carbon footprint relative to the cheap single-pass baseline while remaining below the GPT-4.1 single-pass baseline under the current token-based carbon scenario. In Study~2, GPT-5.3-codex achieves the highest resolution rate in this sample (81.2\%), ahead of Claude Opus~4.6 (68.9\%) and GPT-4.1-mini (25.0\%), but resolved-task-normalized efficiency remains mixed: GPT-4.1-mini is lowest on estimated carbon and cost per resolved task, while GPT-5.3-codex delivers substantially higher task success. All carbon estimates cover output-token inference only; prompt tokens, which exceed 99\% of tokens in Study~2, and tool execution are not charged, so the figures are lower bounds on the full agentic footprint.
BibTeX
@misc{ruf2026toward,
  author = {Boris Ruf and Adrien de Mailly Nesle and Marcin Detyniecki},
  title = {{Toward Sustainable Agentic AI: Carbon Tradeoffs Across Iterative Self-Refinement and Tool-Augmented Coding}},
  year = {2026},
  eprint = {2611.12128},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.12128},
}
Figure