Track Claude Code and Codex usage: tokens, cost, and plan limits.
See where your tokens went, by project and session, and how much of your 5-hour and weekly limits is left, with a verdict on whether you'll run out before the reset. Hit a limit anyway? lpm can send your next prompt when it resets.
In Claude Code, run /usage to see your plan usage bars with reset times, the session's cost and a breakdown of what used your limits; /cost and /stats open the same screen. In Codex CLI, run /status for your plan's limits, usually 5-hour and weekly, as percent left, or /usage for token activity. To watch both in one place, by project and with a pace verdict, use lpm.
Where to check usage in Claude Code and Codex
Where
Claude Code
Codex
In a session
Claude Code/usagePlan bars, session cost and a breakdown. /cost and /stats are aliases.
Codex/statusLimits as percent left, with reset times. /usage shows token activity.
Always on screen
Claude Coderate_limitsIn your statusline, on Pro and Max
Codex/statuslinePin the rate-limit items to the footer
Claude CodeUsage card and sidebar meter, after one click
CodexUsage card and sidebar meter, no setup
To keep 5-hour and weekly usage under every Claude Code prompt without editing config files, use lpm's statusline editor.
Plan limits
Claude Code and Codex 5-hour and weekly limits, with pace
A percentage means little until you know how much of the window has passed, so lpm judges every meter against the clock. Set your own numbers and see what it would tell you.
Will you run out before the reset?
Claude
updated just now
5-hour
72%too fast
resets in 2h 15mruns out in ~1h 4m, before reset
Sidebar · 5-hour window
Claude2h 15m72%
You've used 72% with only 55% of the window gone. At this rate you run out in about 1h 4m, 1h 11m before the reset.
In lpm, hover the usage meter in the sidebar to see this card while you work.
Limit window
2h 45m of 5h
72%
Try:
The tick is the clock. It marks how much of the window has passed. A bar past its tick is using the window faster than time is passing.
The verdict compares the two. Used divided by elapsed above 1.15 reads “too fast”, below 0.85 reads “will last”, and anything between is “on pace”. In the first 5% of a window there's no pace verdict, only “limit reached” once you hit 100%.
Run-out time shows only when it matters. It appears when you're using the window too fast and the current rate would use up the rest before the reset. Bars turn amber at 80% and red at 95%, and a reading older than 15 minutes dims.
How Claude Code limits work
A session limit resets every five hours, and a weekly limit across all models resets at a fixed time assigned to your account, not a week after you start.
claude.ai, Claude Code, Claude Desktop and the IDE extensions draw on one allowance.
Anthropic doesn't publish a token number. Max 5x and Max 20x give five and 20 times Pro's per-session usage.
Codex records its limit windows with each reply. Depending on your ChatGPT plan that is usually a 5-hour and a weekly window, or only a weekly one; credit-based Enterprise and Edu workspaces have no fixed windows.
OpenAI publishes allowances as estimated local messages per five hours, and they vary by model.
At the limit the current turn finishes. Plus and Pro can buy credits, or an API key bills at API rates instead.
Checked . Allowances change; the linked pages have the current rules.
The sidebar meter is on by default and shows the weekly window; switch it to 5-hour or whichever is higher, hide a tool, or hover a row for the full card. Every Claude account you add in lpm gets its own limits card, and the lpm iPhone app shows the same meters. To check a number without the app, use the Claude Code limit calculator.
Limit reached
Claude Code or Codex usage limit reached? Send the next prompt when it resets
Write the next prompt anyway. lpm holds it and sends it 30 seconds after the limit resets, once Claude Code or Codex is ready for it.
How to queue a prompt for the reset
1
Write the prompt in the terminal's composer, as usual.
2
Press ⌥↵ (Alt+Enter on Windows and Linux), or open the Send menu's arrow and choose Send later.
3
Click Limit resets, a flag on the timeline or a button under it when the reset is further out, or type reset in the time field.
4
lpm sends it 30 seconds after the reset, once the agent is idle and waiting for input. Scheduled prompts wait under History › Scheduled, where you can send one now, edit it or cancel it. A prompt that was missed gets New time and Keep as draft instead.
Which limit does it wait for?
The one that's blocking you. If a window is used up, lpm waits for it, and if both are, for the one that resets last, which can be the weekly limit. Otherwise it follows the 5-hour window. The reading comes from the account that terminal's agent runs as.
lpm or Claude Code's automatic continue?
Claude Code 2.1.234 and later can wait in the open session and pick the interrupted task back up after the reset. That's the easy path for finishing one task. Use lpm when the next step is a different prompt, when the agent is Codex, or when you want every waiting prompt in one list.
saas-app · Claude
Wed 2:14 PM
Today4:14 PM· in 2h
Click a flag to schedule, or step with − 30m and + 30m
Claude's 5-hour limit is 100% used
Now1h2h3h4h8 PM10 PMMidnight
2:14 PMlast used
Finish the auth refactor: make the failing session tests pass, then run the full suite.
Send later in lpm, with a sample clock. The Limit resets flag appears when the terminal's agent has a live limit reading.
Works in local Claude Code and Codex terminals that have a live limit reading, not over SSH or on another connected computer. lpm has to be open and the computer awake when the prompt comes due: if lpm is closed or the computer is asleep more than 5 minutes past that time, the prompt is marked Missed instead of sent. For prompts on a timetable, schedule recurring Claude Code and Codex runs.
See your own numbers
Download lpm and add a project folder you already work in. Stats fills in from the Claude Code and Codex sessions already on disk, Codex limits appear on their own, and Claude's take one click. Free, open source, no account.
Claude Code and Codex token usage by project, model and session
Stats reads the usage fields Claude Code and Codex already save on your computer and matches each session to the lpm project it ran in, including sessions from other terminals and from before you installed lpm, as long as the files are still on disk.
Sample data
Stats
Local token usage across your LPM projects
Total tokens
945M
≈ $1,391
peak 67M · 11d ago
Input
927M
96% from cache
Output
18M
17% reasoning
Sessions
381
11 projects · 4 models
Token activity
050M100M
29d ago15d agotoday
Tap a bar for that day's totals
Daily token usage, last 30 days
Date
Claude Code
Codex
Total
Estimated cost
29d ago
15M
4.1M
19M
≈ $29
27d ago
18M
5.6M
24M
≈ $36
26d ago
22M
7.9M
30M
≈ $44
24d ago
27M
9.2M
36M
≈ $53
23d ago
31M
12M
44M
≈ $64
22d ago
25M
8.8M
34M
≈ $50
21d ago
12M
3.1M
15M
≈ $24
19d ago
29M
11M
39M
≈ $58
18d ago
35M
13M
49M
≈ $71
17d ago
30M
11M
42M
≈ $61
16d ago
20M
6.2M
26M
≈ $39
15d ago
14M
4.8M
19M
≈ $28
13d ago
34M
13M
47M
≈ $69
12d ago
42M
16M
58M
≈ $85
11d ago
48M
18M
67M
≈ $98
10d ago
38M
14M
52M
≈ $76
9d ago
23M
7.9M
31M
≈ $45
7d ago
29M
12M
41M
≈ $60
6d ago
37M
15M
51M
≈ $75
5d ago
44M
19M
63M
≈ $91
4d ago
40M
16M
56M
≈ $81
3d ago
27M
9.4M
37M
≈ $54
yesterday
32M
13M
45M
≈ $65
today
16M
6.8M
23M
≈ $34
Breakdown
945M
tokens
Token composition
Projects
saas-app72 sessions255M
auth-service53 sessions170M
ml-pipeline23 sessions132M
docs-site61 sessions85M
saas-app-k3Fq9Z19 sessions76M
mobile-app42 sessions66M
billing-worker30 sessions57M
design-system27 sessions38M
infra23 sessions28M
cli-tools11 sessions19M
marketing-site19 sessions19M
Recent sessions
4 of 5012 of 50
claude-fable-5 · 42m
Input4.5M
Cached4.4M
Output68K
Reasoning0
gpt-5.4 · 38m
Input3.2M
Cached2.8M
Output99K
Reasoning40K
claude-haiku-4-5 · 7m
Input1.7M
Cached1.7M
Output26K
Reasoning0
claude-fable-5 · 1.6h
Input3.1M
Cached3.0M
Output47K
Reasoning0
gpt-5.4-mini · 11m
Input1.2M
Cached1.1M
Output37K
Reasoning15K
claude-fable-5 · 18m
Input1.1M
Cached1.1M
Output17K
Reasoning0
claude-fable-5 · 1.1h
Input3.6M
Cached3.6M
Output55K
Reasoning0
gpt-5.4 · 26m
Input2.2M
Cached1.9M
Output68K
Reasoning27K
claude-haiku-4-5 · 3m
Input2.2M
Cached2.2M
Output34K
Reasoning0
claude-fable-5 · 2.5h
Input5.8M
Cached5.7M
Output88K
Reasoning0
gpt-5.4 · 47m
Input4.0M
Cached3.5M
Output123K
Reasoning49K
claude-haiku-4-5 · 12m
Input1.9M
Cached1.9M
Output29K
Reasoning0
Usage metadata stays on this computer. Prompts and responses are not included.
1,284 local history files scanned · SSH projects excluded
Sample data in the layout of lpm's Stats view. Try it: switch the chart to Share, hide Codex, sort projects by sessions, or open a session.
Why are token counts so high? Cache reads.
Every turn re-sends the conversation so far, and most of it comes back from the prompt cache. Stats counts those cache reads as input, which is why the Input tile often shows 95% or more from cache. Cache reads are priced at a small fraction of fresh input, so a huge total can sit next to a much smaller cost estimate.
Is the cost estimate my bill?
No. It's what the tokens would cost at API list prices built into lpm, per model, with cache reads and writes priced separately, and Codex prices are approximate. On Pro, Max or a ChatGPT plan you pay the subscription, not per token. Use it to compare projects and days, not as an invoice.
Private by design
Where lpm gets the numbers
Everything comes from files and readings already on your computer, and lpm never asks Anthropic or OpenAI for any of it.
What the agents record
Claude Code session files
~/.claude/projects, plus every Claude account lpm manages
Codex session files
~/.codex/sessions
Claude Code's statusline data
5-hour and weekly percentages, once you press Enable
Codex limit readings
written into its session files as it runs
What lpm does on your computer
Matches each session to its project
each copy and worktree is its own project, and when folders nest the deepest match wins
Keeps token counts only
prompts and responses stay out
Counts each reply once
repeated streaming updates and replayed subagent history are skipped
straight from your computer over your network or tailnet, no cloud relay
No account, no API keys, and no requests to Anthropic or OpenAI for any of these numbers.
Codex: nothing to set up.
lpm reads the limits Codex writes to its session files on this computer, whichever terminal you ran it in, so if you've used Codex before its meters can appear as soon as lpm opens. Some plans report only a weekly window.
Claude Code: one click.
Open Usage and press Enable on the Claude card. lpm wraps the statusline in ~/.claude/settings.json so it forwards the 5-hour and weekly readings from Claude Code sessions in lpm terminals, and your own statusline keeps running inside it. Only Pro and Max logins report these windows. Turning it off restores your previous statusline exactly.
Stats and Usage are in the More menu at the bottom of lpm's sidebar; right-click either and choose Move to the sidebar to keep it in view. Not counted in Stats: SSH projects, projects on other computers or Linux servers you control from lpm, and sessions outside your lpm projects. The 5-hour and weekly meters still include everything that counts toward those windows, including claude.ai chat.
Side by side
Claude Code and Codex usage trackers compared
The built-in commands, ccusage, CodexBar and lpm, row by row. Each is best at something.
The built-in commands, ccusage, CodexBar and lpm compared on eight properties
Property
Built-in commands/usage · /status
ccusageCLI reports
CodexBarMenu-bar app
lpmDesktop app with your agents
Live 5-hour and weekly %
Built-in commands
Supported: Claude /usage bars, Codex /status
Codex shows percent left
ccusage
Partial: Estimated 5-hour blocks
From your logs, not the plan's percentage
CodexBar
Supported: Fetched from each provider
Via OAuth, browser cookies or the CLI
lpm
Supported: The percentages each CLI reports
No login, cookies or network requests
Pace and run-out forecast
Built-in commands
Not supported: Percent and reset time only
ccusage
Partial: Burn rate and projected block total
Against a --token-limit you set, not the plan's
CodexBar
Supported: On pace, in deficit or in reserve
Plus “Runs out in …” or “Lasts until reset”
lpm
Supported: Too fast, on pace or will last
Plus “runs out in ~1h 4m, before reset”
Alerts before the limit
Built-in commands
Partial: Both CLIs warn as you get close
Codex: “less than 25% of your 5h limit left”
ccusage
Not supported: No notifications
blocks flags WARNING near a --token-limit you set
CodexBar
Supported: Optional quota notifications
Per-window thresholds plus predictive pace alerts
lpm
Not supported: No notifications
Bars turn amber at 80% and red at 95%
Send a prompt when the limit resets
Built-in commands
Partial: Claude Code continues the interrupted task
2.1.234 and later; Claude only
ccusage
Not supported: No
CodexBar
Not supported: No
lpm
Supported: Any prompt, Claude Code or Codex
Sent 30 seconds after the reset
Token and cost history
Built-in commands
Partial: Per tool
Claude /usage Stats tab; Codex /usage daily, weekly or cumulative
ccusage
Supported: Daily, weekly, monthly, session
Priced from LiteLLM
CodexBar
Supported: Local cost scans
Daily and hourly trends
lpm
Supported: Today, 7 days, 30 days, All time
Both tools together, estimated per model
Usage by project
Built-in commands
Not supported: Not by project
Claude's breakdown is by skill, subagent, plugin and MCP server
ccusage
Partial: Claude Code only
--instances
CodexBar
Partial: Project and session views
Local estimates
lpm
Supported: Per lpm project, both tools
Includes sessions from other terminals
Export
Built-in commands
OpenTelemetry export, statusline JSON
Opt-in, to your own collector or scripts
ccusage
Supported: --json
CodexBar
Supported: Bundled codexbar CLI
lpm
Not supported: No export
Platform and price
Built-in commands
Part of each CLI
ccusage
Free, open source
Any OS with Node or Bun; many agent CLIs
CodexBar
Free, MIT
macOS 14+ and Linux; dozens of providers
lpm
Free, MIT
macOS, Windows and 64-bit x86 Linux, with an iPhone app
Claude-Code-Usage-Monitor (Claude Code only) runs a live terminal dashboard with pace, burn-rate forecasts and warnings, and can read Claude Code's official 5-hour and weekly percentages through its statusline hook. The provider dashboards, claude.ai Settings > Usage and chatgpt.com/codex/settings/usage, show your limits with no tool at all.
Which one should you use?
The built-in commands, for a quick look at the session you're in.
ccusage, for terminal reports, JSON, and agent CLIs beyond Claude Code and Codex.
CodexBar, for limits in the menu bar across many providers, even with the CLIs closed.
lpm, if you run your agents in lpm and want usage by project, a pace verdict, and the next prompt sent at the reset.
Facts checked . Every lpm row and demo on this page was checked against the app's source code.
Run /usage in Claude Code. On a Pro, Max, Team or Enterprise plan it shows your plan usage bars with reset times and a breakdown of what used your limits; with an API key it shows the session's tokens and cost. You can also open claude.ai Settings > Usage, or, on Pro and Max, put the 5-hour and weekly percentages in your statusline. On Pro and Max, lpm shows the same two windows as live meters with a pace verdict, next to your token totals by project.
What's the difference between /usage, /cost and /stats in Claude Code?
There isn't one anymore. Since Claude Code 2.1.118, /cost and /stats are aliases of /usage. /stats opens the same screen on its Stats tab, where r switches between Last 7 days, Last 30 days and All time. The dollar figure is an estimate at list prices, and on a subscription it isn't what you're billed.
How do I check my Codex usage and rate limits?
In Codex CLI, run /status. It lists the limits your plan reports, usually a 5-hour and a weekly window, as percent left with reset times. /statusline pins limit items to the footer, and /usage shows daily, weekly or cumulative token activity when you're signed in with ChatGPT. On the web, open chatgpt.com/codex/settings/usage. lpm reads Codex limits with no setup and shows them as percent used, beside Claude's.
How does the Claude Code 5-hour limit work?
On a Claude subscription, usage counts against a session window that resets every five hours and a weekly limit across all models. Both are shared with claude.ai, Claude Desktop and the IDE extensions, and Anthropic doesn't publish a token number for either. Max 5x and Max 20x give five and 20 times Pro's per-session allowance. An API-key login has no plan windows: you pay per token, and lpm's Claude card says there are no limits to show.
When does the Claude Code weekly limit reset?
At a fixed day and time each week that Anthropic assigns to your account, not seven days after you start. /usage and claude.ai Settings > Usage show the next reset. In lpm, the Weekly meter shows it as a countdown and a date, such as “resets in 3d 19h · Sep 27, 4:30 PM”, and the sidebar meter shows the weekly window by default.
Does Claude Code share usage limits with claude.ai?
Yes. Claude Code, claude.ai, Claude Desktop and the IDE extensions draw on one plan allowance. lpm's 5-hour and weekly meters include your claude.ai use too, because the percentages come from Claude Code itself. A separate Fable weekly limit, if your plan has one, shows in /usage and claude.ai Settings > Usage, not in lpm. Its Stats view counts only the Claude Code and Codex sessions on this computer, so claude.ai chats use up your limit without appearing in Stats.
What can I do when I hit my Claude Code or Codex usage limit?
Wait for the reset, use a free reset if you have one, or pay to keep going. Claude Code 2.1.234 and later can wait in the open session and continue the interrupted task after the reset. Anthropic occasionally gives eligible plans a free limit reset, used from Settings > Usage on claude.ai or in Claude Desktop, and Pro and Max can turn on usage credits or upgrade. When Codex hits a limit, the current turn finishes; you can redeem an earned reset from /usage if you have one, Plus and Pro can buy credits, or you can switch to an API key. In lpm, press ⌥↵ (Alt+Enter on Windows and Linux) and choose Limit resets: your next prompt goes out 30 seconds after the window resets, once the agent is idle, in a local Claude Code or Codex terminal.
How much does Claude Code cost, and is lpm's estimate my bill?
Claude Code comes with Claude's Pro and Max plans, which cost $20, $100 or $200 a month in the US as of September 2026; with an API key you pay per token instead. lpm's figure is not a bill. It's what your tokens would cost at the API list prices built into lpm for each model, with cache reads and writes priced separately, so it can lag behind price changes, and Codex prices are approximate. On a subscription, treat it as a yardstick for how heavy your usage is.
Can I see Claude Code token usage by project?
Yes. lpm's Stats view matches the Claude Code and Codex sessions on this computer to the lpm project whose folder it ran in, including sessions started from another terminal or editor and ones from before you installed lpm. Copies and worktrees you make in lpm are projects of their own, so their tokens are counted separately; when project folders nest, the deepest one gets the session. Sort projects by tokens, sessions or name, and open a recent session to see its input, cached, output and reasoning tokens. SSH projects and projects on other computers or Linux servers aren't counted.
What do too fast, on pace and will last mean?
lpm divides the share of a window you've used by the share of time that has passed. Above 1.15 reads “too fast”, below 0.85 reads “will last”, and anything between is “on pace”; in the first 5% of a window there's no pace verdict, only “limit reached” at 100%. When it reads too fast and the current rate would use up the window before it resets, the meter adds an estimate such as “runs out in ~1h 4m, before reset”.
Why is Claude Code using so many tokens?
Mostly because every request carries the whole conversation. Claude Code re-reads that history from the prompt cache on each turn, so a long session adds up quickly even when your messages are short. Cache reads are priced far below fresh input, which is why a huge total can come with a modest cost estimate. lpm's Input tile shows how much came from cache, and starting a fresh session with /clear when you switch tasks keeps it down.
Why don't I see my Claude limits in lpm?
Open Usage and press Enable on the Claude card. lpm then wraps the statusline in ~/.claude/settings.json and keeps your existing one running inside it. Limits arrive once a Claude Code session in an lpm terminal gets a reply, and only for Pro and Max logins: Claude Code leaves plan windows out of the statusline data for API-key logins and Team or Enterprise seats, though Stats still counts their tokens. Turning it off restores your previous statusline exactly.
Is lpm an alternative to ccusage or CodexBar?
It covers similar ground in a different way. ccusage is a command-line report for many agent CLIs, with JSON export and 5-hour blocks estimated from logs. CodexBar is a menu-bar app that fetches limits for many providers through their accounts or browser cookies, even with no CLI running. lpm is the desktop app you run Claude Code and Codex in: it shows the limits the two CLIs report, judges pace, splits tokens by project, and can send a prompt when a limit resets. All three are free and open source.
Does lpm send my prompts or usage anywhere?
No. Stats reads only the usage fields in Claude Code and Codex session files, not prompts or responses, and the limit meters use what the two CLIs report while they run. lpm doesn't contact Anthropic or OpenAI for these numbers and needs no account. If you pair the lpm iPhone app, it gets the same numbers straight from your computer over your network or tailnet, with no cloud relay.
Why doesn't All time go further back?
lpm can only count the session files still on disk, and Claude Code deletes them after 30 days by default. To keep more history, set cleanupPeriodDays in ~/.claude/settings.json to a larger number, such as 365. Codex keeps its session files, but lpm reads only ~/.codex/sessions, so archived sessions and sessions under a custom CODEX_HOME aren't counted.
lpm is free and open source. Download it, run Claude Code and Codex in your projects, and see what they used, how much of your plan is left, and when it resets.