Disclosure: I build TokenBar, one of the tools below. I've tried to keep this useful whichever one you pick, and most of the options here are free.
If you use Claude Code or Codex on a subscription, you've probably hit a limit halfway through a task. Neither tool shows your remaining usage by default, so it's easy to burn through a session window without noticing.
This guide covers five ways to keep an eye on it on a Mac, starting with the free, built-in ones.
First, how the limits actually work
Claude (Pro, Max, Team). Paid plans have two kinds of limits: a session limit that resets every five hours and weekly limits that reset once a week. Max plans also have a separate weekly limit for some models. Usage from claude.ai, Claude Desktop and Claude Code all counts toward the same pool, so a long chat in the browser eats into your coding budget too. How fast you use it depends on the model, context length, effort level and the features you use. (Claude Help Center)
Codex (ChatGPT plans). Codex comes with ChatGPT plans, and its usage depends on the model, task complexity, context, reasoning and tools. Plans have had a five-hour window plus weekly limits, but OpenAI has changed this more than once in 2026. The five-hour window was temporarily lifted for some plans, and Pro currently has no five-hour limit. Codex also shares its allowance with other agent features like ChatGPT Work. Check your own account rather than trusting a blog post, this one included. (OpenAI Help Center)
1. Built-in commands (free, zero setup)
Claude Code:
-
/usageshows session cost, plan usage limits (the five-hour session and weekly bars with reset times) and activity stats./costand/statsare aliases for it. -
/contextshows what's filling your context window as a colored grid. -
/compact [instructions]summarizes the conversation so far to free up context. A bloated context makes every later turn cost more, so compacting early is one of the easiest ways to make your limit last. -
/usage-creditsopens usage-credit settings when you hit a limit.
Codex CLI:
-
/statusin an active session shows your remaining limits and reset times. - The Codex usage dashboard (Settings → Usage) is the official source of truth.
Pros: official numbers, nothing to install, nothing to trust.
Cons: you have to remember to check, it only works inside a session, and you see one tool at a time.
2. ccusage (free, open source CLI)
ccusage reads the usage data that coding agent CLIs store locally and turns it into daily, weekly, monthly and per-session reports with token counts and estimated costs. It now covers far more than Claude Code: Codex, Gemini CLI, GitHub Copilot CLI, OpenCode, Amp and many others.
npx ccusage@latest # all detected sources, by day
npx ccusage claude daily # just Claude Code
npx ccusage codex daily # just Codex
npx ccusage blocks # Claude Code 5-hour windows
npx ccusage statusline # status line for Claude Code hooks (beta)
ccusage blocks is the most useful one for limits, because it groups your Claude Code activity into five-hour windows.
Pros: free, scriptable, --json output, works offline from local files, covers lots of tools.
Cons: it's an estimate built from your local logs. It can't see your plan's actual remaining percentage, and it doesn't count usage from claude.ai or other machines.
3. Read the logs yourself (free, maximum control)
If you want your own dashboard or alerts, the raw data is on disk:
-
Claude Code:
~/.claude/projects/<encoded-project-path>/<session-id>.jsonl, plussubagents/folders in newer versions. Assistant records carry amessage.usageobject with input, output and cache tokens. -
Codex CLI:
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl. Look forevent_msgrecords whose payload type istoken_count.
Two traps people hit when summing these:
-
Claude Code duplicates. Resumed sessions can repeat earlier assistant turns, so deduplicate on
message.id(plusrequestId) or your totals come out inflated. -
Codex cumulative totals.
token_countevents carry bothtotal_token_usage(a running total) andlast_token_usage(just that turn). Sumlast_token_usageonly. Also note that OpenAI'sinput_tokensalready includescached_input_tokens.
Neither format is officially documented, so expect it to change between versions.
Pros: total control, no third-party code.
Cons: real work to build, breaks when formats change, and like ccusage it can't see your server-side remaining quota.
4. Free menu bar apps
A menu bar app keeps the numbers visible without you having to ask. These three are free and open source (MIT):
CodexBar (macOS 14+, brew install --cask codexbar). It shows limits and reset countdowns for a long list of providers: Codex, Claude, Cursor, Gemini, Copilot and dozens more. You get one menu bar item per provider, or a merged icon. For Claude it uses OAuth, browser cookies or the CLI, and it ships a codexbar CLI for scripts.
Claude Usage Tracker (macOS 14+, installed with Homebrew). It tracks Claude's five-hour session, weekly and per-model usage, with optional Codex tracking. Its standout feature is support for multiple Claude accounts with their own credentials, plus status line integration, usage history charts and threshold notifications.
Usage4Claude (macOS 13+, installed from a DMG, Intel or Apple silicon). It tracks Claude's five-hour, seven-day, extra-usage and per-model limits, plus Codex's five-hour, seven-day and credit balance. Its "pace" graph shows whether you're using your allowance faster than time is passing, which is handy for weekly limits.
Pros: they're free and always visible, and they show your real remaining quota rather than an estimate from logs.
Cons: most read credentials from your Keychain or browser cookies, so read what each one accesses. Some depend on unofficial endpoints that can break when a provider changes things.
5. TokenBar (paid)
TokenBar is my app, so weigh this section accordingly. It's a macOS 14+ menu bar app that brings Claude, Codex, Cursor, Gemini and Copilot into one place: allowances, credits and reset timing, plus a spending view with cost history. It also adds agent notifications for finished tasks, input requests, approvals and stalls on supported integrations, and "Pixel Agents," a small pixel-art office that shows which coding sessions are working or need attention. It also shows CPU, memory and energy so you can see what your agents are doing to your Mac.
Pricing: Pro is $15 once for a lifetime license on one Mac, or Basic is $5/month. You buy inside the app.
Pros: one view across providers, agent notifications, a polished native UI.
Cons: it costs money while the apps above are free. Coverage varies by integration, and it's a one-Mac license.
Comparison
| Method | Cost | Shows real remaining quota | Claude Code | Codex | Always visible | Setup |
|---|---|---|---|---|---|---|
/usage, /status
|
Free | Yes | Yes | Yes | No | None |
| ccusage | Free (OSS) | No (estimate from logs) | Yes | Yes | Via status line | npx |
| Raw JSONL logs | Free | No | Yes | Yes | If you build it | High |
| CodexBar | Free (MIT) | Yes | Yes | Yes | Yes | Low |
| Claude Usage Tracker | Free (MIT) | Yes | Yes | Optional | Yes | Low |
| Usage4Claude | Free (MIT) | Yes | Yes | Yes | Yes | Low |
| TokenBar | $15 lifetime / $5 mo | Yes | Yes | Yes | Yes | Low |
Which should you use?
-
You check occasionally:
/usageand/statusare enough. - You want history and cost reports: ccusage.
- You want it always visible, for free: CodexBar if you use many providers, Claude Usage Tracker if you juggle several Claude accounts, Usage4Claude if you like pace tracking.
- You want spending, agent notifications and multiple providers in one paid app: TokenBar is one option.
Whatever you pick, the habits that stretch a limit the most are the same: /compact before context gets huge, use smaller models for routine work, and keep in mind that your claude.ai chats share the same pool as Claude Code.
What are you using to stay under your limits? I'd like to hear about setups I've missed.
Top comments (0)