Long sessions
3.1M3 sessions ended several times larger than the 128K this machine usually reaches. Every turn after that re-reads the whole window.
acme-web · 214 turns · 62.4K → 604.1Kbilling-api · 168 turns · 58.1K → 511.7K
Local · open source · zero dependencies
Every Claude Code session on one page — which one is waiting on you, what each is spending, and how much of your limits is left.
npx claude-code-session-trackerThen open the printed http://127.0.0.1:3099.
Node 20 or newer · macOS, Linux, and Windows
Preview
Limits on top, sessions below, and details for any row you open.
Claude Code
Sessions
Resets 19:30 · 2h 41m left
At the last hour's pace you'll hit the limit at 18:52, 38m before it resets. Anthropic's reading of this five-hour window, 2m ago.
Resets Mon 25 Aug, 03:00 · 2d 10h left
Every model. Anthropic's reading of this week, 2m ago.
Last 7 days
3 sessions ended several times larger than the 128K this machine usually reaches. Every turn after that re-reads the whole window.
acme-web · 214 turns · 62.4K → 604.1Kbilling-api · 168 turns · 58.1K → 511.7K
Sessions open holding 74.3K — the system prompt, tools, skills and memory files, paid before anything is asked.
38 sessions
Ranked by what each accounts for, in the tokens a limit counts. A finding appears only where the range runs heavier than this machine's own middle.
| Project | Session | Status | Model | Tokens (in/out/total) | Uptime |
|---|---|---|---|---|---|
| acme-web~/code/acme-web | Rework the checkout flow279ed6ae | busy | opus-5 | 182.4K / 12.9K / 195.3K | 1h 24m |
| billing-api~/code/billing-api | Paginate the invoices endpointb41c7d02 | waitinginput needed | sonnet-5 | 96.2K / 7.4K / 103.6K | 18m 42s |
| design-system~/code/design-system | Tidy the button variants5f2a91c4 | idle | sonnet-5 | 41.8K / 3.1K / 44.9K | 3h 06m |
| Project | Session | Model | Last active | Tokens (in/out/total) |
|---|---|---|---|---|
| acme-web~/code/acme-web | Fix the flaky checkout testit only fails on CI, never on my machine | opus-5 | 12m ago | 214.7K / 15.3K / 230.0K |
| mobile-app~/code/mobile-app | Retry the offline write queueflush the queued writes once the connection is back | sonnet-5 | 2h ago | 158.9K / 11.2K / 170.1K |
| docs-site~/code/docs-site | Add dark mode to the docsauto, light and dark, and no flash on first paint | sonnet-5 | 5h ago | 88.4K / 6.1K / 94.5K |
| billing-api~/code/billing-api | Rotate the webhook secretmove it to the secret store and re-sign the callbacks | haiku-4-5 | yesterday | 23.1K / 1.9K / 25.0K |
| acme-web~/code/acme-web | Windows CI: separators in the path testthe path assertions only hold on posix | opus-5 | 3d ago | 61.2K / 4.4K / 65.6K |
50 of 794 on disk
Read-only. Bound to loopback. Nothing leaves this machine.
/filter↑↓move↵openEscclose
Tokens, context left, prompts, and a resume command to copy.
Static context shows what fills the window before you type — CLAUDE.md, skills, tools, MCP — the part you can actually shrink.
Every figure comes straight from the transcript. Nothing is guessed.
acme-web
Rework the checkout flow
busy
19% of 1M tokens · opus-5
41,207 tokens before the first turn ran, estimated from the text each block put in the window.
Its 38 turns read 4.2M back out of cache between them. Those reads bill at a fraction of the rest, so they sit outside the totals above.
Limits
Two windows, five hours and seven days. Each card shows how full it is and when it runs out at your current pace.
Anthropic's own reading of each limit, the same number /usage shows.
Input, output and new cache tokens, across every project and subagent. Cache reads are shown apart.
Based on your recent pace, the card says when the window runs out — or where it will stand at reset.
Red is time elapsed, blue is where you'll land. Fill past the red tick means you're spending too fast, and the bar turns red.
Offline or without a fresh reading, the bar falls back to your heaviest past window — and says so.
Alerts
A desktop notification before a window runs out. Off by default.
Claude Code
Settings
SessionsHistorySettingsA desktop notification before a window runs past its limit.
Session limit
now127.0.0.1:3099
At the last hour's pace you'll hit the limit at 18:52, 38m before it resets.
Hear about a limit before you reach it
A desktop notification when a window is on course to run past its limit — even with this tab behind your editor.
Nothing asks for permission until you flip a switch.
One per interval: an hour for the session, four for the week.
Suggested once when a limit first appears.
A week with no reset from Claude stays silent.
History
A second page with your last month of tokens by day, hour, project and model.
Claude Code
History
SessionsHistorySettings25 Jul – 23 Aug · 30 days
Billed tokens per local day. A mark under a bar is a turn Claude refused.
Every half hour of the range, over one week. Darker is heavier.
Ranked by billed tokens. Pick one to narrow everything above.
| Project | Turns | Billed | Cache reads | Share |
|---|---|---|---|---|
| acme-web~/code/acme-web | 4,182 | 18.4M | 902.6M | 44% |
| billing-api~/code/billing-api | 2,140 | 9.1M | 431.7M | 22% |
| mobile-app~/code/mobile-app | 1,884 | 6.7M | 318.2M | 16% |
| design-system~/code/design-system | 1,102 | 4.3M | 205.9M | 10% |
| docs-site~/code/docs-site | 903 | 3.3M | 154.1M | 8% |
Every model that answered in this range.
| Model | Turns | Billed | Cache reads | Share |
|---|---|---|---|---|
| opus-5 | 6,204 | 27.6M | 1.3B | 66% |
| sonnet-5 | 3,411 | 12.1M | 620.4M | 29% |
| haiku-4-5 | 596 | 2.1M | 92.1M | 5% |
Read at 21:14
A bar per day. A mark under a bar is a day Claude refused a turn.
A month folded onto one week — when your window actually opens.
Ranked by billed tokens. Pick a project to narrow everything to it.
Bookmarkable: range and project live in the URL. Capped at 90 days.
Reuses the limit cards' read, so it costs almost nothing. Nothing polls — click Refresh.
What you get
Limits, live status, token usage and history, on one page.
Quickstart
No install needed. Or use Homebrew to keep it on your PATH.
npx claude-code-session-trackerNo install step. It starts a local server and opens your browser.
Served at http://127.0.0.1:3099.
Refreshes every 2 seconds. Click a row for details.
Start at login
NewOne command adds it to your login items. Another takes it out.
brew install meyusufdemirci/tap/claude-code-session-trackerclaude-code-session-tracker autostart onAdded as a Login Item, listed in System Settings → General → Login Items.
To turn it off:
claude-code-session-tracker autostart offA login item needs a copy that stays on disk, so npx won't do here.
One command, no admin rights. It starts the tracker right away, too.
The dashboard opens at http://127.0.0.1:3099 every time.
Command line
Every flag, command and keyboard shortcut.
| Flag or command | Description | Default |
|---|---|---|
| -p, --port <number> | Port to listen on, stepping forward up to 20 times if taken | 3099 |
| --host <address> | Address to bind. Anything but loopback drops the guard, and the CLI says so | 127.0.0.1 |
| --no-open | Do not open a browser | — |
| --json | Print the session list as JSON and exit | — |
| -n, --limit <number> | How many sessions to list. Running sessions always show | 50 |
| --claude-dir <path> | Override the Claude data directory | ~/.claude |
| --offline | Never ask Anthropic's server for the usage limits; the cards fall back to Claude Code's cached readout or an estimate | — |
| autostart on | Start at login and open the page, on macOS and Windows. Starts it now, too | — |
| autostart off | Stop starting at login | — |
| autostart status | Say whether it starts at login | — |
| -h, --help | Show usage | — |
| -v, --version | Show the version | — |
Scripting
Anything the page does, you can do with curl.
| Method | Route |
|---|---|
| GET | /api/sessions?limit=NThe session list. `limit` matches --limit, and running sessions are always included. |
| GET | /api/sessions?since=&until=The same list, narrowed by last-written time. Epoch ms; `since` inclusive, `until` exclusive. |
| GET | /api/sessions?sort=`recent` (default), `tokens-desc`, or `tokens-asc`. Ranks across the whole window, not just the page. |
| GET | /api/sessions/:idOne session with counts, tokens, models, activeMs, awaySummary, and notes. |
| GET | /api/limitsBoth limits, as `session` (five hours) and `weekly` (seven days). Each carries the window in progress, Anthropic's percentage as `reported`, the heaviest closed window, and `lastLimited`. |
| GET | /api/usage/history?since=&until=&project=A sparse half-hour series, plus every project and model in the range ranked by billed tokens. Defaults to 30 days; spans over 90 are narrowed, and `range` in the reply is what was read. |
| GET | /api/usage/adviceThe findings behind the `Where it goes` panel as measurements, not sentences. Same params as the history route; defaults to 7 days. |
| GET | /api/healthStatus, version, the Node it runs on, the resolved Claude directory, and per-source status. |
| POST | /api/sessions/:id/revealShows that transcript in your file manager. Requires a loopback Origin. |
--json prints the same payload the page uses, then exits.
npx claude-code-session-tracker --json | jq '.sessions[] | .project.name'{
"sessions": [
{
"id": "279ed6ae-49fd-4234-a74e-145f5535341c",
"source": "claude-code",
"status": "busy", // busy · waiting · idle · ended
"project": { "name": "…", "path": "…", "gitBranch": "main" },
"title": "Disable dependabot", // Claude's own title, when it wrote one
"firstPrompt": "…",
"lastPrompt": "…",
"model": "claude-sonnet-5",
"version": "2.1.235",
"startedAt": 1787142489923,
"lastActiveAt": 1787142700231,
"transcriptPath": "…/279ed6ae….jsonl",
"sizeBytes": 136133,
"live": { "pid": 4129, "kind": "interactive", "entrypoint": "cli" }
}
],
"total": 794,
"generatedAt": 1787142701002
}Privacy
Read-only, loopback-only, and no telemetry.
It only reads what Claude Code already wrote.
Binds to 127.0.0.1 and rejects other hosts, so no website can reach it.
Only Claude Code's usage endpoint. No telemetry, no analytics.
Nothing third-party runs on your machine.
| Path | Used for |
|---|---|
| ~/.claude/sessions/<pid>.json | Running sessions and their live status |
| <session cwd>/.git/HEAD | The branch a running session is on |
| ~/.claude/projects/**/*.jsonl | Session history — titles, prompts, models, branch |
| ~/.claude/projects/*/*/subagents/agent-*.jsonl | Subagent turns, for the limit windows they bill to |
| ~/.claude.json | The usage readout Claude Code caches — how full each limit is, and when it resets |
| Keychain · ~/.claude/.credentials.json | The token Claude Code is signed in with, to ask for the same readout /usage shows. Skipped with --offline |
FAQ
Node 20 or newer · macOS, Linux, and Windows. MIT licensed.
npx claude-code-session-tracker