How to Check Aider Token Usage and Cost
Aider already prints what each message costs — you just have to know where to look. Here is how to read it, total it over time, and watch the bill that actually charges you.
Quick answer
/tokenscommand shows the current context size, and Aider prints a per-message and running session cost. There is no saved history — for that, read your model provider's billing page. 🔥Aider is a much-loved open-source terminal AI pair-programmer — roughly 46k GitHub stars — that edits your repository through a back-and-forth chat in the shell. Unlike subscription agents, Aider is bring-your-own-key: you plug in an API key for whatever model you prefer, so the real cost of running it is simply your provider's usage bill. The good news is that Aider is unusually transparent about spend in the moment. The catch is that the moment is all it shows you — close the session and the per-message figures are gone.
How do I check token usage in Aider?
You do not need any extra tool to see live spend. Aider prints a cost line after each exchange, and it keeps a running session tally. The clearest single readout is the in-chat /tokens command, which breaks down exactly what is being sent to the model on the next request:
/tokens Approximate context window usage ────────────────────────────────────────── System prompt 1,040 tokens Chat history 6,820 tokens Repository map 4,310 tokens Added files (3) 12,180 tokens ────────────────────────────────────────── Total 24,350 of 128,000 tokens
That breakdown is genuinely useful because it shows why a request is large. In Aider, the repository map and the files you have explicitly added to the chat are usually the biggest line items — every message re-sends them, so a fat context is a recurring cost, not a one-off. Dropping a file you no longer need with /drop shrinks every subsequent request.
Read the cost line after every message
After each reply, Aider prints something likeCost: $0.0182 message, $0.41 session. The first number is what that single exchange cost; the second is the cumulative total since you launched. Glancing at the session figure is the fastest way to feel when a long debugging loop is getting expensive.What does the /tokens command show?
/tokens answers a different question than the cost line does. The cost line is about money already spent; /tokens is about the size of the nextrequest — the prompt Aider will send if you type another message right now. It tallies four things and sums them against your model's context limit:
System prompt
fixed instructions
Chat history
grows each turn
Repo map + files
your context
Next request
the billed total
Because chat history grows with every turn, the same task gets pricier the longer the conversation runs — even if your prompts stay short. That is the single most useful thing /tokens reveals: when the total creeps toward the context limit, it is time to /clear the history or start a fresh session rather than keep paying to resend a bloated transcript.
Getting cost printed automatically
Aider estimates cost using the model's published per-token pricing. If you do not see cost lines, make sure model metadata is available and that cost reporting is not disabled — launching with the --cost behaviour enabled (it is on by default for known models) prints the per-message and session figures shown above. For a model Aider does not recognize, supply pricing yourself so the estimate is accurate.
How is Aider's cost actually calculated?
There is no mystery to the number — it is just tokens times your model's rate, with input and output priced separately. Because every Aider turn re-sends the system prompt, the repo map, your added files, and the whole chat history, the input side dominates:
This is why Aider's context discipline tools matter so much to the bill. A 20k-token context resent across forty messages is 800k input tokens before you count a single reply. Trimming the repo map or dropping files is not housekeeping — it is the most direct lever you have on cost when you are paying per token.
How do I track Aider cost over time?
Here is the honest limitation: Aider shows you per-message and per-session cost, but it keeps no persistent historical dashboard. Once the terminal closes, those figures are not stored anywhere you can total later. To see spend across days and weeks, you have two real options:
- 1
Read your model provider's billing page
Aider is bring-your-own-key, so the authoritative record of what you spent lives with your provider — the usage dashboard for whichever API key you pointed Aider at. That is the bill that actually charges you, broken down by day and model. - 2
Keep your own running note
Some developers jot the session-total cost line at the end of each Aider run. It is manual, but it captures the per-project breakdown the provider dashboard flattens away. - 3
Compare against your other agents
If Aider is one of several terminal tools you run, the question you usually care about is not “what did Aider cost” but “where did all my AI coding spend go.” That cross-tool view needs a tool that reads the logs your other agents keep.
whoburnedmore does not read Aider's logs
To be straight with you: whoburnedmore does notparse Aider's sessions. Aider already shows its own per-message cost, and the authoritative total is your provider's bill. Where whoburnedmore helps is the tools it does read — Claude Code, Codex CLI, Gemini CLI, opencode and more — so you can total those agents and see them on one leaderboard.Aider is bring-your-own-key — what does that mean for cost?
Aider has no subscription of its own and no usage cap it enforces. Every token it spends is billed by whatever model provider issued the API key you configured. That has two consequences worth internalizing:
| Where to look | Live per-message | Session total | Day/week history | Cross-tool |
|---|---|---|---|---|
| Aider /tokens + cost line | — | — | ||
| Your provider's billing page | — | — | by day | — |
| whoburnedmore (other agents) | not Aider | not Aider | many tools |
First, there is no plan to “use up” — cost simply accrues with tokens, which is why the live cost line is the discipline that keeps it in check. Second, if you run several models or several tools through the same key, the provider dashboard mixes them together. For the agents whoburnedmore supports, the cross-tool usage guide shows how to pull them apart into one comparable table.
A quick honest summary
For Aider specifically, the native tools are the answer: /tokensfor context size, the per-message cost line for live spend, and your provider's billing page for the real historical total. Reach for whoburnedmore when you want to measure the other terminal agents alongside it.
shows context size
Aider's own subscription
live cost Aider prints
Related guides
How to Check Your AI Coding Token Usage
The cross-tool overview: one command that totals your token usage and cost across every AI coding agent you run.
How to Check Codex CLI Usage and Token Cost
Codex CLI's /status only shows the current window — here's how to see your full history and cost.
A ccusage Alternative With a Leaderboard
Built on the same data as ccusage — with a cross-tool dashboard and a leaderboard on top.