You are two hours into a refactor when Claude Code stops and tells you that you’ve hit your session limit. So you search for a Claude Code dashboard, something that would have shown it coming, and Google hands you two different things.
Half the results chart your usage. A Grafana dashboard fed by Claude Code’s OpenTelemetry export, a command-line tool called ccusage, blog posts where someone parsed their own logs. The other half are people asking Claude Code to build them a dashboard of something else, like sales or a launch.
This guide covers both. First, each way to chart your Claude Code usage, what it shows and what it misses. Then the quicker route for both jobs. Context Board is a live board Claude Code builds for you over MCP, with your plan limits, your sessions and your business numbers on one screen.
- The quickest route is a live board your agent builds. Context Board shows what is left of your Claude Code plan’s five-hour window and week, every session and what waits on you, beside your revenue and traffic. Two terminal commands connect Claude Code to it. Free for 3 days, then $6 a month.
- For a team’s token and cost history, use OpenTelemetry. Claude Code exports sessions, tokens, estimated cost, lines, commits and pull requests to a backend you run, and community Grafana dashboards chart them.
- For your own token history, run ccusage. One command reads Claude Code’s local logs and prints tokens and estimated cost by day, week, month or session.
- Neither one reads your plan limit. They count what you used. On Pro or Max, the number that stops you is the window, and it lives in
/usage, a custom status line, or the board. - To have Claude Code build a dashboard of anything else, connect it to the board and ask in plain words. It adds the widgets, connects live sources and never makes up a number.
What a Claude Code dashboard can show
There are two kinds of number here, and most tools only do one.
Usage history is what you spent. Tokens, estimated cost, sessions, lines of code, commits. It matters most on API billing, where every token is a charge, and to anyone running Claude Code for a team.
Plan headroom is what you have left. On a Pro or Max plan you don’t pay per token. You get a five-hour session window and a weekly limit, shared with Claude chat, and when either runs out you wait. The useful number is a percentage and a reset time, like 38% left, resets in 1h 42m.
Claude Code already shows some of this, if you know where to look.
/usagein the terminal: subscribers see plan usage bars and a breakdown of what used them. API users see the session’s tokens and an estimated cost.- A custom status line: on Pro and Max, Claude Code hands your status line script the five-hour and seven-day percentages and their reset times.
- Team and Enterprise analytics: admins get lines accepted, accept rate, daily active users and contribution metrics at claude.ai/analytics/claude-code.
- The Claude Console: API customers get spend, lines and activity per member at platform.claude.com/claude-code.
The status line fields are listed in Anthropic’s status line docs. The first two answer inside one terminal, when you look. The last two are for admins, and they describe the organization, not the window you are about to run out of. The guide to checking your Claude Code usage walks through each of them.
Grafana with OpenTelemetry
Search for a Claude Code dashboard and this is the first thing you find. It is the serious option for teams.
OpenTelemetry is the open standard for sending metrics and logs to a monitoring system. Claude Code supports it, and it is off by default. Anthropic’s monitoring docs turn it on with a few environment variables.
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
From then on Claude Code sends eight metrics. They count sessions, lines of code, pull requests, commits, cost in dollars, tokens by type and model, code edit decisions, and active time. It also sends events, one per prompt, API request and tool result. Your prompt text stays redacted unless you set OTEL_LOG_USER_PROMPTS=1.
Something has to receive all that. You run an OpenTelemetry collector, or use the built-in Prometheus exporter, and store the numbers in a metrics database. Grafana sits on top and draws them.
You don’t have to design the charts. Grafana’s dashboard library has community Claude Code dashboards. The top one reads the telemetry from Azure Application Insights and shows total cost, sessions, prompts, API errors, active time, daily cost by model, top tools, lines added against removed, and cost per user. Another runs on VictoriaMetrics and VictoriaLogs. Anthropic’s own Claude Code ROI Measurement Guide has Docker Compose, Prometheus and OpenTelemetry setups to start from.
Three things to know before you start.
- It is three systems before it is a chart: a collector, a database and Grafana, all running somewhere and all yours to keep up.
- The cost is an estimate: Anthropic’s docs say the cost metrics are approximations, and point you to the Console for billing.
- None of the eight metrics is your plan limit: it counts what you used. It can’t tell you that you have 15% of your week left.
For a lead with twenty developers on API billing, none of that is a problem. Anthropic’s cost docs call OpenTelemetry the only option that streams per-user token and cost metrics into your own monitoring stack in near real time, and admins can switch it on for everyone through managed settings. For one founder on a Max plan, it is a lot of plumbing to learn a number that is not the one you need.
ccusage and do-it-yourself scripts
ccusage
ccusage is a free, open-source command-line tool. Run npx ccusage@latest and it reads your local usage logs and prints tokens and estimated cost by day, week, month or session. It reads Codex and a long list of other coding agents too.
It is the fastest answer to “how much have I used this month”, and it costs nothing. Two limits come with it. The cost is an estimate from token counts and list prices, and its docs say it may not match your bill. And its blocks view, which groups usage into five-hour windows, measures you against a limit you choose, either a token number or your busiest past block. Its own docs tell you to set that limit below your real quota for safety. The limit is your guess, not your plan’s.
It also answers when you run it. The live monitor from older versions was removed in version 18, and the docs now point you to a status line instead.
A script over your session logs
Claude Code writes every session to disk, as JSONL files under ~/.claude/projects/, one per session. A short script can count sessions, prompts and tool calls per project per day and draw them as an HTML chart. Claude Code will happily write that script for you.
Two catches. Claude Code deletes those transcripts after 30 days by default, so a long history means copying them somewhere first. And per Anthropic’s docs on the .claude directory, the files are plaintext and hold everything that passed through a tool, file contents and command output included. A script that ships them to a hosted chart ships your code with them.
A live board with your limits, sessions and business
Context Board is a web app at board.contextbolt.com. It’s ours, so weigh the bias. You build a board for yourself and your agents keep it current. For Claude Code, it reads three things straight off your computer.
- AI usage: what is left of your current five-hour window and your week, for Claude Code and Codex side by side. Each is a ring that empties as you work, turns amber under half and red under a fifth, and says when it comes back: “resets in 1h 42m”, “resets Mon 9:00 AM”. A model’s own weekly limit shows too, when your plan has one.
- Agent activity and Needs you: every Claude Code and Codex session on your computers, in a terminal, VS Code or an app that runs them, with its title and project, and whether it is working, done or waiting for you. A question, an OK, a plan to approve.
- Git activity: today’s commits, the branch, and what is not committed yet.
- Claude Code · apiasks to approve a plan3m
- Signups chart reads the real streamweb11:20
- Retry the webhook on 429api10:05
- Trial banner shows the priceweb09:12
Those three come from the runner, a small program you set up once with one line from the board’s Connect window. It starts with your computer and reads what Claude Code and Codex last heard from their own servers about your plan. From your sessions, only names, states and percentages leave your computer, never what you and Claude Code wrote. Run the same line on a second computer or a server and its sessions and usage join the board.
Then there is everything else on the board, and this is the real reason to pick it over Grafana. The screen you glance at all day should hold your plan and your business together. Stripe revenue, Google Analytics, Search Console, Plausible, Lemon Squeezy, GitHub, npm downloads, any JSON API or RSS feed, connected once and live while the board is open.
Start from the Agents template and the usage, sessions and git widgets are there already. The Claude Code usage page shows the widget up close. Context Board is free for 3 days, then $6 a month, one plan with everything in it.
How to build a dashboard with Claude Code
Now the other half of the search. You want a dashboard of your business, and you want Claude Code to build it.
The usual route is to ask it for one, and it writes you a web app. A React page, some charts, sample data that looks great in a demo. Then the real work starts. Where it runs, how it gets live numbers from Stripe, what happens when an API changes, and who fixes it at 11pm.
The quicker route is to give Claude Code a board to build on. Sign in at board.contextbolt.com with your email, then run these two commands once.
claude mcp add --transport http --scope user context-board https://board.contextbolt.com/mcp
claude mcp login context-board
Your browser opens the board. Click Allow. Claude Code can now read the board, add and change widgets, connect live sources, send it data, and say what it is working on. Then ask.
Copy this prompt
Read my Context Board, then build me a board called Founder HQ.
Top left, my Stripe MRR as a number with its trend. Beside it,
today's Plausible visitors. Below them, the stars and open
issues on my GitHub repo, and its weekly npm downloads. Use what
I have connected. If something is not connected, tell me how to
connect it instead of guessing.
Claude Code reads the board first, then checks what you have connected. Public data like GitHub stars and npm downloads it connects as live sources itself. Your own services, like Stripe or Plausible, you connect once in the board’s Connect window, and it reads them from there. It never asks you for a key.
When no built-in widget fits, it writes a custom one with the board’s own widget kit, then checks how it drew before telling you it is done.
Copy this prompt
Make a widget on my Context Board that shows this month's Stripe
revenue against last month's, as two bars with the difference
in big type.
Claude Code also lists this as a slash command, /mcp__context-board__make_widget.
You can mix the two halves of this guide. Ask Claude Code to run ccusage and push the last 30 days of estimated cost to a chart on the board. A number it works out like that is a copy, so it stays as sent until it sends again. A cron job can resend it every morning through the board’s push API.
One thing it won’t do. The AI usage, Needs you and Git activity widgets read your own computer, so only you add them, from the gallery or the Agents template. Everything an agent changes carries its name and can be undone.
Which Claude Code dashboard to use
| Route | What it shows | What is left of your plan | Setup | Cost |
|---|---|---|---|---|
| 1. Context Board | Claude Code and Codex limits, sessions, commits, plus revenue and traffic | Both windows, with reset times | Two commands, one line for the runner | $6/mo after a 3-day trial |
| 2. Grafana with OpenTelemetry | Tokens, estimated cost, sessions, lines, commits, PRs, per user | Not among its metrics | Environment variables, a collector, a database, Grafana | Free software, plus wherever it runs |
| 3. ccusage | Tokens and estimated cost by day, week, month or session | Five-hour blocks against a limit you set | One command | Free, open source |
| 4. A script over your logs | Whatever you count | Only what you build | You write it and keep it working | Free |
Pick by the question that sent you here.
- “Why did Claude Code stop in the middle of my work?” That is the window, and you can see it coming. Context Board keeps it in sight beside the rest of your day.
- “Build me a dashboard of my business.” Connect Claude Code to Context Board and ask. You skip the hosting and the plumbing, and the numbers stay live.
- “How much did I use this month?” ccusage answers in one command, for free, and pairs well with the board.
- “What is my team spending, per person?” OpenTelemetry into Grafana.
Where Grafana still fits
If you run Claude Code across a team on API or cloud billing, and you need cost per developer, alerts when spend jumps, and months of history, OpenTelemetry into Grafana is the right job for the right tool. It sees every machine your admin configured, and it keeps the history as long as your database does.
That is a different job from the one most people searching this have. Context Board is a board for your own work, by you and your agents. It shows your plan’s limits rather than per-user cost reports, and it doesn’t send alerts. If you’re a founder on a Pro or Max plan, what you need is the window you’re about to hit and the business it’s building, in one place. The Context Board vs Grafana page lays the two side by side.
If Codex is in the mix too, the Codex usage guide covers where its limits live, and the board puts both on the same widget.
Start with whatever stopped you. If it was a bill, ccusage will add it up tonight. If it was a session limit in the middle of a refactor, that one you can see coming, and the board keeps it in sight. Try Context Board free for 3 days.