Estimating the footprint of a coding agent¶
No model provider says how much energy a request to Claude or GPT uses. agent-top 0.32 estimates it from how long each response took on your machine, multiplied by the power of a published inference server. The result is a median with a 90% interval, and it names its method and sources.
This post covers what is published, the methods others use, why agent-top settled on response time, and how the interval is computed.
What the providers publish¶
Four providers have said something about energy or emissions per request.
| Source | Figure | What it covers |
|---|---|---|
| Anthropic | none | No energy, emissions or water figure per request or per token. |
| OpenAI (June 2025) | 0.34 Wh per average ChatGPT query | No method and no prompt length. |
| Google (arXiv 2508.15734) | 0.24 Wh and 0.03 g CO2e per median Gemini Apps text prompt | Accelerators, host CPU and memory, idle reserve machines and data-centre overhead, at a PUE of 1.09. Market-based emissions. |
| Mistral (July 2025) | 1.14 g CO2e per 400-token Le Chat response | A life-cycle study that includes server manufacturing. No Wh figure. |
Each figure describes a chat prompt of a few hundred tokens. An agent response is a different kind of request. A model keeps no state between requests, so for every response the harness sends the whole conversation again: the system prompt, tool definitions, memory files, every message and every tool result still in context. In a long session that is 50,000 to 900,000 tokens per response (see context compaction). Multiplying 0.24 Wh by the number of agent responses gives a figure 25 to 90 times lower than any method that accounts for context.
The methods in use¶
Without a measured figure, estimates fall into three families.
Per-token coefficients. A table of watt-hours per million input, cache-read, cache-write and output tokens, multiplied by the session's tokens. The most-cited table for Claude Code (a March 2026 estimate) gives 390, 39, 490 and 1,950 Wh per million. Those four numbers are Opus 4's list prices × 26 Wh per dollar. The table assumes energy follows price. Price is not energy: Opus 4.5 costs a third of Opus 4, and nothing suggests it uses a third of the power. The same scaling at today's prices gives a figure about 5× lower than at Opus 4's prices.
Physics models. EcoLogits estimates GPU energy per output token from a model's active parameters and the number of GPUs needed to hold it. Closed models do not publish their size, so the parameter count is itself an estimate, and input and cached tokens do not appear in the formula. A newer model by Vartziotis et al. adds prefill and the attention reads over the cached context, which explains why a cache read costs anything at all. Its calibration covers requests of 500 tokens in and 500 out. An agent response here re-reads hundreds of thousands, far outside the range it was fitted on.
Response time × server power. Jegham et al., "How Hungry is AI?" (2025), estimate a closed model's energy from how long it takes to answer. A response occupies part of an inference server for its duration, and the server's power is known from its hardware. The paper checked the method against the only public figures. It put a short GPT-4o prompt at 0.42 Wh, against OpenAI's 0.34 Wh, and a 400-token Mistral response at 1.09 g CO2e, against Mistral's own 1.14 g.
The Green Software Foundation's Software Carbon Intensity specification (ISO/IEC 21031:2024) frames all three as the operational part of a footprint: energy × the grid's carbon intensity, per unit of work. Its embodied part, the emissions from manufacturing the hardware, is left out of all three, and out of agent-top's figure.
Why response time¶
The per-token and physics methods take every input from outside the machine. Response time takes its largest input from the machine itself. agent-top already records the duration of every model response as an inference span, for the run graph and waterfall. For Claude Code and OpenCode, and for any agent that sends OpenTelemetry, the duration is a measurement and not an assumption.
The duration also responds to the things that change the work: a longer context, a larger model or a longer answer all take more time. A coefficient table can only follow token counts.
The formula¶
For each timed response:
| Input | Value | Source |
|---|---|---|
| Duration | from the request to the reply's last block, capped at 10 minutes | measured by agent-top |
| Server | 8 × H100 SXM: 5.6 kW of GPU in a 10.2 kW node | the paper's class for every undisclosed flagship model (Table 1) |
| The request's share | batch 4: 10–13.5% of the GPU power and 12.5% of the rest; batch 8: 5.5–7.5% and 6.25%; batch 16: 3.5–4.5% and 3.125% | the paper's Table 5 |
| PUE | 1.14 on AWS, 1.12 on Azure, 1.27 on DeepSeek's own | the paper's Table 1 |
The cap is the Claude API's default request timeout. A span longer than that includes a pause, not inference.
The host comes from the model's maker. Claude is assumed to run on AWS, GPT and Codex models on Azure, and DeepSeek on its own servers. No provider says where a request ran, so the page labels this as an assumption.
CO2e is the energy × the host's grid factor: 0.287, 0.35 and 0.6 kg per kWh, location-based. Water is the data centre's own use plus the water used to generate the electricity, which is most of it. For AWS that is 0.18 L per kWh on site (divided by PUE) and 5.11 L per kWh off site.
The interval¶
The largest unknown is how many requests share the server at once. A server answering four requests gives each a larger share of its power than one answering sixteen. The paper reports about 45% less energy per prompt from batch 4 to 8, and 43% less again from 8 to 16.
agent-top treats batch 4, 8 and 16 as equally likely, with the utilisation spread evenly within each range of Table 5. The request's power is then an equal mixture of three uniform distributions. Its 5th, 50th and 95th percentiles are computed exactly by bisection, without random sampling:
| kW per request, before PUE | |
|---|---|
| 5th percentile | 0.35 |
| median | 0.65 |
| 95th percentile | 1.30 |
The same assumption holds for every response in a period, so their uncertainties move together. If the true batch size is 16, it is 16 on Monday and on Friday. A month's interval is therefore the sum of its days' intervals and is as wide, in proportion, as one day's. Summing never narrows it. A chart of CO2e by day can still be compared day to day: a day twice as high did twice the work, whatever the true figure turns out to be.
The interval is about 3.7× wide from the 5th to the 95th percentile. The earlier release multiplied every low bound together and every high bound together, which gave a range about 60× wide. That range was the same for every day, so the chart only redrew the token count.
A worked example¶
Take an invented month: 40 hours of timed Claude responses and $2,000 at list price.
- Energy: 40 h × 0.65 kW × 1.14 = 29.7 kWh at the median. The 90% interval is 15.9 to 59.4 kWh.
- CO2e: 29.7 kWh × 0.287 kg/kWh = 8.5 kg, from 4.6 to 17.0 kg.
- Water: 29.7 kWh × (0.18 ÷ 1.14 + 5.11) L/kWh = about 157 L.
- List-price cross-check: $2,000 × 26 Wh = 52 kWh, inside the interval and 1.75× the median.
One 10-second response is about 2 Wh at the median, roughly eight times Google's 0.24 Wh chat prompt. The difference is the context it re-reads.
When there is no timing¶
Codex, Gemini CLI and Kodelet do not write response timings that agent-top can read. Their sessions fall back to 26 Wh per list-price dollar, the ratio behind the per-token table above. It gives one figure with no interval, and the page says which sessions it covered. Every other session shows the list-price figure next to the response-time figure, as a check.
A session is estimated by the first method that applies:
- Your table, when
~/.config/agent-top/energy.tomllists the session's model. - Response time, when its responses were timed.
- List price, when it has a cost.
A session none of these fits is counted as unestimated.
What it shows¶
The Footprint view is under Insights in agent-top ui.

- CO2e, energy and water, each as a median with its interval, and the change on the period of the same length before.
- CO2e per unit of work: per response, per hour of model time, per session, per list-price dollar and per million tokens. A busier month with the same intensity did the same work per gram.
- How the methods compare: response time, list price, your table and the per-prompt figures on one logarithmic axis, so where they agree is visible at a glance.
- CO2e by day, with a whisker for the interval. A session that ran over several days is spread over the days its responses ran.
- By context size: each timed response paired with the context it carried, from under 50k tokens to over 1M. Long contexts make responses slower, so they weigh more.
- Where it comes from: shares by model, project and harness, and the ten heaviest sessions, each opening its run graph and context timeline.
- Comparisons with car kilometres, a tree seedling's growth and Arctic sea ice, drawn only when the interval is within 5×.
- Exact, estimated and left out, as three lists.
agent-top report --energy prints the same figures. --json gives each as {p5, p50, p95}.
The Context view, beside it under Insights, shows how large contexts grow, what fills them and how often they compact. The context drives most of the footprint.
What is left out, and the limits¶
The figure leaves out training the models, manufacturing the hardware, idle capacity kept in reserve, and your own machine and network.
Within what it covers:
- The duration is measured at the client. It includes network and queueing time, so it can only overstate.
- The server is a published model, not Anthropic's or OpenAI's fleet, which also runs accelerators other than the H100.
- Long contexts need more memory per request, so they probably run at smaller batches than 4. The interval stops at batch 4.
- A session is estimated with its own model. A subagent on a different model is counted at the session model's factors.
The method, every factor and its source are on the footprint page. Run brew upgrade agent-top or cargo install --locked agent-top for 0.32, then agent-top sync && agent-top ui. The demo shows the same page on invented sessions.