How to Check OpenHands Token Usage and Cost
OpenHands runs long autonomous loops on your own API key — so the bill lands on your LLM provider, not inside any single tidy dashboard.
Quick answer
npx whoburnedmore. 🔥OpenHands — the open-source autonomous engineering agent formerly known as OpenDevin — is one of the most-starred projects in its category, with a community that runs it to plan, write, and test code with very little hand-holding. Because it drives a multi-step agent loop rather than a single chat turn, a single “solve this issue” task can fan out into dozens of model calls before it finishes. You bring your own model credentials, point OpenHands at them, and it does the rest. That design is great for control and privacy, but it means there is no OpenHands invoice: the spend surfaces on whichever provider key you configured.
OpenHands task
autonomous loop
Many model calls
plan · act · observe
Your LLM key
BYO credentials
Provider bill
where cost shows up
How do I see OpenHands token usage?
There are two reliable places to look, and you generally want both because they answer different questions.
The in-app per-run cost readout
OpenHands surfaces a running cost figure for the active session in its web interface. As the agent works through a task, that number ticks upward, giving you a live sense of how expensive a particular job is becoming. This is the fastest way to catch a runaway loop — if a single refactor is past a few dollars and still spinning, that is your cue to pause it. Treat this readout as a real-time gauge for one task, not as your monthly accounting.
Your LLM provider's usage dashboard
Because OpenHands consumes your own credentials, the authoritative spend total lives on the provider side. In the Anthropic Console or the OpenAI usage page you can filter by date and by API key, so the cleanest practice is to issue a dedicated key just for OpenHands. Then every token that key consumed is, by definition, OpenHands spend — no guesswork about which tool ran up the bill.
Give OpenHands its own API key
Provisioning a separate provider key for OpenHands turns an otherwise-murky bill into a clean line item. Filter your provider's usage dashboard by that key and the resulting total is pure OpenHands cost for the period — handy when several agents share one account.Why does OpenHands cost so much per task?
The autonomous loop is the answer. Each iteration feeds the growing conversation history, the file contents the agent has opened, and the tool results back into the model — so token consumption compounds with every step. A rough way to think about a single task's cost:
Here i indexes each step of the loop, ctx is the input context for that step (which trends upward as history accumulates), out is the tokens the model generates, and p is the published per-token price. Two levers dominate the result: how many iterations the agent takes, and how large the context grows before the task completes. A frontier model on a sprawling repository can quietly run a single task into the several-dollar range, which is exactly why the live readout matters.
Model choice is the biggest dial
Swapping the configured model is the single most effective cost control in OpenHands. A smaller or cheaper model can cut a task's spend by an order of magnitude, at some cost to success rate on hard problems. Many users run a cheap model for routine edits and reserve a frontier model for genuinely tricky tasks.Where does OpenHands fit among other agents?
OpenHands sits at the autonomous, self-hosted end of the spectrum. Knowing where its cost data lives — versus the terminal agents that write local logs — keeps your tracking honest:
| Trait | OpenHands | Claude Code | Codex CLI |
|---|---|---|---|
| Runs autonomously | long loops | interactive | interactive |
| Bring your own API key | or subscription | or subscription | |
| Live per-run cost in UI | /cost | — | |
| Writes a local usage log | provider-side | ||
| whoburnedmore reads it | not supported | ||
| Where the bill lands | your provider | provider/plan | provider/plan |
How do I track my other AI agents' spend?
OpenHands is only one tool in most people's rotation. The terminal agents you run beside it — Claude Code, Codex, Gemini CLI, opencode — each leave a local usage log on disk, and those are exactly what whoburnedmore aggregates into a single total:
$ npx whoburnedmore↳ scanning local usage logs… openhands: no local log (BYO-key, check your provider) TOOL TOKENS EST. COST claude code 16.7M $52.40 codex 7.3M $19.80 gemini cli 2.9M $3.70 ───────────────────────────────────────── cli total 26.9M $75.90
Add your OpenHands number — pulled from your provider dashboard as described above — on top of this CLI total to get your true monthly AI-coding spend. The two sources are complementary: whoburnedmore covers the log-writing terminal agents automatically, and the provider dashboard covers your autonomous OpenHands runs.
- 1
Watch the OpenHands live cost while a task runs
Keep an eye on the per-run figure in the UI and pause any loop that climbs past your comfort threshold before it finishes. - 2
Pull the real total from your provider
Open your Anthropic or OpenAI usage dashboard, filter by the date range and the API key you dedicated to OpenHands, and read off the period total. - 3
Total the rest with whoburnedmore
npx whoburnedmorereads your local terminal-agent logs and prints token and cost totals per tool. Runnpx whoburnedmore --localto keep everything on your machine instead of submitting to the leaderboard. - 4
Add the two figures
OpenHands provider total + whoburnedmore CLI total = what your agents actually cost this month.
places to check OpenHands cost
model calls a single task can fan out to
OpenHands data whoburnedmore touches
Does whoburnedmore read OpenHands?
No — and it is worth being precise about that. OpenHands stores its accounting on your LLM provider's side rather than in a local log file on your disk, so there is nothing for npx whoburnedmoreto parse. The OpenHands cost story is owned entirely by the in-app readout plus your provider's usage dashboard. What whoburnedmore does cover are the terminal agents that write local logs — and even for those, it reads only the metadata (token counts, model names, timestamps), never your prompts or code, and only submits aggregate numbers if you choose to. 🛡️
If your autonomous setup also includes lighter terminal tooling, the guide to checking Amp, Droid, and Goose usage walks through the same one-command flow for three newer agents that whoburnedmore can read directly.
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 opencode Token Usage and Cost
opencode keeps detailed logs — here's how to turn them into a token + cost total.
The Best AI Coding Token Trackers in 2026
ccusage vs tokscale vs native dashboards vs whoburnedmore — a free, cross-tool comparison.