Search topic
aider token usage
Practical outcome
Aider logs cost per message; here's how to total past sessions from its chat history.
Quick answer
Tokens: 12k sent, 1.2k received. Cost: $0.05 message, $0.41 session. The /tokens command shows what the next request will cost. Aider also writes those usage lines to .aider.chat.history.md in your repo, so you can total past sessions with grep. Your model provider's billing page holds the authoritative total. whoburnedmore does not read Aider. 🔥Aider is a popular open-source AI pair-programmer for the terminal, with about 50k GitHub stars as of November 2026. It edits your git repo through a chat in the shell. The latest tagged release is v0.86.x, from 2025. Aider is bring-your-own-key: you give it an API key for whatever model you like, and there's no Aider subscription, so what Aider costs you is your provider's usage bill. Aider is unusually open about spend while you work, and with one small habit you can keep that record after you close the terminal too.
How do I check token usage in Aider?
No extra tool is needed. After each exchange Aider prints a usage report. If the model reports prompt caching, the report also shows cache write and cache hit counts. To see what is about to be sent, use the in-chat /tokens command. Its output looks like this; the numbers here are only an example:
> /tokensApproximate context window usage for claude-sonnet-4-5, in tokens: $ 0.0062 2,071 system messages$ 0.0205 6,820 chat history use /clear to clear$ 0.0129 4,310 repository map use --map-tokens to resize$ 0.0365 12,180 src/billing/invoice.py /drop to remove==================$ 0.0761 25,381 tokens total 174,619 tokens remaining in context window 200,000 tokens max context window size
That breakdown shows why a request is big. In Aider, the repository map and the files you added to the chat are usually the largest lines, and every message re-sends them. A fat context costs you again on every turn, not once. Dropping a file you no longer need with /drop makes every later request smaller.
Read the usage line after every message
The report looks likeTokens: 12k sent, 1.2k received. Cost: $0.05 message, $0.41 session. The first dollar figure is that one exchange. The second is the running total since you launched Aider, and it resets each time you start a new session. If the model reports caching, the line also shows cache write and cache hit token counts.What does the /tokens command show?
/tokens answers a different question from the usage line. The usage line is about money already spent. /tokens is about the next request, the prompt Aider will send if you type another message now. It lists system messages, chat history, the repository map and each added file (read-only files included). It prices each line at the model's input rate and compares the total with the model's context window:
System messages
fixed instructions
Chat history
grows each turn
Repo map + files
your context
Next request
priced at input rate
Chat history grows with every turn, so the same task costs more the longer the conversation runs, even if your prompts stay short. When the total gets near the context limit, /clear the history or /reset (drop all files and clear history) rather than keep paying to resend a bloated transcript. /tokens shows input only. The model's reply is billed on top, at the output rate.
When Aider shows tokens but no dollar figure
Aider prices usage from the model's metadata. If a model has no known per-token input price, the usage line shows only the token counts and drops the “Cost:” part. Aider has no --cost switch. To get dollar figures for an unknown or custom model, give it pricing in a model metadata file: .aider.model.metadata.json by default, or point --model-metadata-file at your own. By default (--show-model-warnings), Aider also warns you when it has no metadata for the model you picked.
How is Aider's cost actually calculated?
It's tokens times your model's rate, with input and output priced separately, plus cache reads and writes where the provider supports them. Aider tries LiteLLM's cost calculator first and falls back to the model's per-token prices. Every Aider turn re-sends the system prompt, the repo map, your added files and the whole chat history, so the input side dominates:
That's why Aider's context controls matter so much for the bill. A 20k-token context re-sent across forty messages is 800k input tokens before you count a single reply. Shrinking the repo map (--map-tokens) or dropping files isn't housekeeping. When you pay per token, it's the most direct lever you have. With Anthropic models, --cache-prompts (off by default) turns on prompt caching, so the repeated context bills at the discounted cache-read rate.
How do I track Aider cost over time?
Aider has no usage dashboard, but it does leave a trail. Its usage reports go to the chat history file along with the conversation, as quoted lines. That gives you three dependable sources:
- 1
Grep the chat history file in each repo
By default Aider appends to.aider.chat.history.mdin the repo where you ran it (change the name with--chat-history-file). Rungrep "Cost:" .aider.chat.history.mdto list every usage line. The last “session” figure before each new session header is that session's total. Each repo keeps its own file, so this gives you a per-project breakdown your provider can't. - 2
Read your model provider's billing page
This is the authoritative record. Open the usage dashboard for the API key Aider used. It shows what you were actually charged, by day and model, but it mixes in every other app on that key. - 3
Log the full LLM traffic if you need detail
--llm-history-filewrites every message sent to and received from the model to a file you choose. It's heavy, but it's useful when you need to see exactly why one session cost so much.
whoburnedmore does not read Aider
To be clear: whoburnedmore does not parse Aider's chat history files or LLM logs, and Aider usage won't show up on your whoburnedmore dashboard or the leaderboard. Use Aider's own usage lines and your provider's bill for Aider. whoburnedmore covers 22 other local sources, including Claude Code, Codex CLI, Gemini CLI, opencode, Cline and Goose, so you can total those agents in one place.Aider is bring-your-own-key — what does that mean for cost?
Aider has no subscription and enforces no usage cap. Every token is billed by the provider that issued your API key, which has two consequences:
First, there's no plan to “use up.” Cost simply grows with tokens, so the usage line is what keeps it in check. Second, if several tools share one key, the provider dashboard lumps them together. Giving Aider its own API key, or its own project on the provider, is the simplest way to see Aider's spend on its own. For the agents whoburnedmore supports, the cross-tool usage guide shows how to put them in one table.
A quick honest summary
For Aider, use Aider's own tools: /tokens for the next request's size, the usage line for live spend, .aider.chat.history.md for past sessions, and your provider's billing page for the real total. Use whoburnedmore to measure the other agents you run.
next-request size and input cost
Aider's own subscription
usage line, also saved to chat history
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 shows the current limits; here's how to see your full token history and cost by day.
A ccusage Alternative With a Leaderboard
Built on the same data as ccusage — with a cross-tool dashboard and a leaderboard on top.