Claude Code's /usage command and the Codex CLI's /status command show your current limits for free, and a Claude Code status line script can display the 5-hour and 7-day usage with reset times. ccusage reads local agent logs to report historical token use and estimated costs. Menu bar apps such as CodexBar and Allowbar keep usage and the next reset visible at all times, and Allowbar warns at 50% and 20% remaining.
The quickest way to check Claude Code usage is the built-in /usage command; for Codex it is /status in the CLI. Both are free and authoritative. Third-party tools add two things the built-ins do not: history over days and weeks, and a gauge you can see without typing a command.
This page compares the options: built-in commands, the Claude Code status line, ccusage, CodexBar and Allowbar. For how the limits themselves work, see Claude Code usage limits and Codex usage limits.
What does /usage show in Claude Code?
In Claude Code, /usage shows a Session block with the current session's token usage and an estimated cost, computed locally at list price. The Claude Code docs note that this cost figure is meant for API users; on Pro, Max and Ultra plans, usage is included in the subscription, and /usage shows plan usage bars and activity stats instead.
On Pro, Max, Ultra, Team and Enterprise plans, /usage also breaks down recent usage by skills, subagents, plugins and MCP servers, with recommendations such as trimming a large CLAUDE.md. You can switch between the last 24 hours and the last 7 days. These breakdown figures come from local session history, so usage from other devices or claude.ai is not included.
# inside a Claude Code session
/usageWhen you hit a limit, the "You've hit your session limit" or "weekly limit" message shows when the window resets.
What does /status show in Codex?
In the Codex CLI, /status shows your remaining limits during an active session. OpenAI also lists your current limits in the Codex usage dashboard at chatgpt.com/codex/settings/usage. The Codex docs describe usage in five-hour periods for some plans, with weekly limits that may also apply, and local and cloud work sharing the same allowance.
Can the Claude Code status line show usage limits?
Yes. The Claude Code status line runs a script you configure and passes it JSON on stdin. For claude.ai Pro, Max and Ultra subscribers, that JSON includes rate_limits.five_hour and rate_limits.seven_day, each with a used_percentage (0 to 100) and a resets_at time in Unix epoch seconds. The field appears only after the first API response in a session, and each window may be absent.
{
"statusLine": {
"type": "command",
"command": "jq -r '\"5h: \\(.rate_limits.five_hour.used_percentage // \"-\")% | 7d: \\(.rate_limits.seven_day.used_percentage // \"-\")%\"'"
}
}This is free and always visible while Claude Code is open, but it lives inside one terminal and covers only Claude Code.
What is ccusage and what does it read?
ccusage is an open-source, MIT-licensed CLI that analyzes coding agent token usage and costs from local data. It reads the usage logs that agents write on your machine (for Claude Code, under ~/.claude/ or ~/.config/claude/projects/; for Codex, under ~/.codex or $CODEX_HOME) and aggregates them by day, week, month, session or 5-hour block.
npx ccusage@latest daily
npx ccusage@latest blocks
npx ccusage@latest codex dailyccusage supports Claude Code, Codex and many other agent CLIs. Its docs say the logs are analyzed on your machine and not sent anywhere, that costs are estimates that may not match billing, and that official releases send an opt-out daily usage ping. It reports history and estimated cost; it does not read your plan's remaining quota from the provider. It also offers a beta statusline command for Claude Code.
Fits people who want to see trends, compare days, or estimate what API-priced usage would cost.
What about menu bar apps?
Menu bar apps keep usage on screen without a terminal command.
CodexBar is a free, MIT-licensed macOS 14+ menu bar app by Peter Steinberger. It shows limits for Codex, Claude, Cursor and many other providers, with session, weekly and monthly windows and countdowns to the next reset. Install it with brew install --cask codexbar.
Allowbar is a macOS menu bar app for Claude Code and Codex. Its usage view shows Claude, Codex and Cursor usage in one place with the time of the next reset, and the island warns when you drop below 50% and below 20% remaining, and when a limit resets. Usage is one part of the app: it also lets you answer permission prompts with Allow, Block or Terminal, lists sessions by state, and keeps a local activity log. It never approves anything on its own. It is in private beta, not yet available for download.
Comparison table
Which usage tracker should I use?
Use the built-ins first. /usage and /status are the authoritative numbers and cost nothing. Add a status line if you live in one Claude Code session and want a constant readout.
Add ccusage if you want history or cost estimates: it is the best fit for questions like "how much did I use last week". Add CodexBar if you want a free menu bar gauge across many providers. Consider Allowbar if you also want to answer agent prompts from the menu bar and get warnings before you run out, so you can keep coding while doing something else.
Keeping limits visible from the menu bar
The value of a menu bar gauge is timing: you see 20% left before starting a large refactor, not halfway through it, and you know when the window resets so you can plan around it. Allowbar combines that with its permission panel, so one glance covers what is waiting on you and how much usage you have left. Allowbar is in private beta. Join the waitlist; the launch price is $9.99 instead of $29.90.
Sources
- Claude Code costs and the /usage command
- Claude Code status line fields
- Codex pricing and usage limits
- ccusage on GitHub and ccusage guide
- CodexBar on GitHub
Frequently asked questions
How do I check my Claude Code usage limit?
Run /usage inside Claude Code. Subscribers see plan usage bars and a breakdown of what used the most; API users see the session's token usage and estimated cost. When you hit a limit, the message tells you when the window resets.
How do I check Codex usage?
Run /status in an active Codex CLI session to see remaining limits, or open the usage dashboard at chatgpt.com/codex/settings/usage.
Does ccusage show how much of my plan is left?
No. ccusage reads local logs and reports historical token use and estimated costs by day, session or 5-hour block. For the remaining quota, use /usage, /status, the status line rate_limits fields, or a menu bar app.
Does ccusage send my data anywhere?
The ccusage docs say agent logs, prompts and costs are analyzed on your machine and never sent. Official releases send an opt-out daily usage ping, and an offline mode uses cached pricing data.
Can I get an alert before I hit my Claude Code limit?
Claude Code does not send one by default, but you can script it from the status line rate_limits fields. Allowbar warns when you drop below 50% and 20% remaining and when a limit resets.