$ claude-code-session-tracker

Local · open source · zero dependencies

Get more out of every Claude Code session.

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-tracker

Then open the printed http://127.0.0.1:3099.

3stars
170downloads / month
v0.8.0latest

Node 20 or newer · macOS, Linux, and Windows

Preview

The page it opens

Limits on top, sessions below, and details for any row you open.

Claude Code

Sessions

LiveUpdated 16:49:12

Session limit 14:30 → 19:30

Resets 19:30 · 2h 41m left

58%
Used
1.9M
At this pace
Limit 18:52

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.

Weekly limit 18 Aug → 25 Aug

Resets Mon 25 Aug, 03:00 · 2d 10h left

59%
Used
31.4M
At this pace
88% at reset

Every model. Anthropic's reading of this week, 2m ago.

Last 7 days

Long sessions
3.1M

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

Standing context
1.6M

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.

Active 3

ProjectSessionStatusModelTokens (in/out/total)Uptime
acme-web~/code/acme-webRework the checkout flow279ed6aebusyopus-5182.4K / 12.9K / 195.3K1h 24m
billing-api~/code/billing-apiPaginate the invoices endpointb41c7d02waitinginput neededsonnet-596.2K / 7.4K / 103.6K18m 42s
design-system~/code/design-systemTidy the button variants5f2a91c4idlesonnet-541.8K / 3.1K / 44.9K3h 06m

Recent 5

ProjectSessionModelLast activeTokens (in/out/total)
acme-web~/code/acme-webFix the flaky checkout testit only fails on CI, never on my machineopus-512m ago214.7K / 15.3K / 230.0K
mobile-app~/code/mobile-appRetry the offline write queueflush the queued writes once the connection is backsonnet-52h ago158.9K / 11.2K / 170.1K
docs-site~/code/docs-siteAdd dark mode to the docsauto, light and dark, and no flash on first paintsonnet-55h ago88.4K / 6.1K / 94.5K
billing-api~/code/billing-apiRotate the webhook secretmove it to the secret store and re-sign the callbackshaiku-4-5yesterday23.1K / 1.9K / 25.0K
acme-web~/code/acme-webWindows CI: separators in the path testthe path assertions only hold on posixopus-53d ago61.2K / 4.4K / 65.6K

50 of 794 on disk

Read-only. Bound to loopback. Nothing leaves this machine.

Fully interactive, with invented data. Swipe a table to see the rest of it.

Open any row

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

Tokens

Input
182,411
Output
12,907
Total
195,318
Cache read
4,182,660
Cache write
311,204

Context window

Static (system + tools)
41.2K
Conversation
154.1K
Free
804.7K

19% of 1M tokens · opus-5

Static context

  1. ~/code/acme-web/CLAUDE.md18,214 · 44%
  2. Skills (32)9,431 · 23%
  3. Deferred tools (86)5,102 · 12%
  4. Agents (11)3,608 · 9%
  5. MCP instructions2,417 · 6%
  6. Everything else2,435 · 6%

41,207 tokens before the first turn ran, estimated from the text each block put in the window.

What this session cost

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.

The window an average turn held
110.1K
Of it, static — read back every turn
41.2K
Subagents, billed here but not shown
2

Session

Model
opus-5
Started
14:12
Last active
just now
Elapsed
1h 24m
Working time
38m 09s

Limits

How much of each window is left

Two windows, five hours and seven days. Each card shows how full it is and when it runs out at your current pace.

  1. The same percentage /usage shows

    Anthropic's own reading of each limit, the same number /usage shows.

  2. Used is what you were billed for

    Input, output and new cache tokens, across every project and subagent. Cache reads are shown apart.

  3. At this pace, it runs out at…

    Based on your recent pace, the card says when the window runs out — or where it will stand at reset.

  4. Two ticks on the bar

    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

Told before you hit a limit

A desktop notification before a window runs out. Off by default.

http://127.0.0.1:3099/settings

Claude Code

Settings

SessionsHistorySettings

Notifications

A desktop notification before a window runs past its limit.

Session limitThe five-hour window.
At most one every1 hour
Weekly limitThe seven-day window.
At most one every4 hours

Session limit

now

127.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.

Not nowOpen notifications
  1. Off until you turn it on

    Nothing asks for permission until you flip a switch.

  2. Once, then quiet

    One per interval: an hour for the session, four for the week.

  3. Offered once

    Suggested once when a limit first appears.

A week with no reset from Claude stays silent.

History

Where the tokens actually went

A second page with your last month of tokens by day, hour, project and model.

http://127.0.0.1:3099/history?range=30d

Claude Code

History

SessionsHistorySettings
RangeLast 30 daysRefresh

25 Jul – 23 Aug · 30 days

Billed
41,812,904
Cache reads
2,012,517,338
Turns
10,211
Projects
5
Models
3
Busiest day
12 Aug · 2.9M

Spend per day 26 active

Billed tokens per local day. A mark under a bar is a turn Claude refused.

Hour of day

Every half hour of the range, over one week. Darker is heavier.

Projects 5

Ranked by billed tokens. Pick one to narrow everything above.

ProjectTurnsBilledCache readsShare
acme-web~/code/acme-web4,18218.4M902.6M
44%
billing-api~/code/billing-api2,1409.1M431.7M
22%
mobile-app~/code/mobile-app1,8846.7M318.2M
16%
design-system~/code/design-system1,1024.3M205.9M
10%
docs-site~/code/docs-site9033.3M154.1M
8%

Models 3

Every model that answered in this range.

ModelTurnsBilledCache readsShare
opus-56,20427.6M1.3B
66%
sonnet-53,41112.1M620.4M
29%
haiku-4-55962.1M92.1M
5%

Read at 21:14

Invented data. Swipe the grid and the tables to see the rest of them.
  1. Spend per day, quiet days included

    A bar per day. A mark under a bar is a day Claude refused a turn.

  2. Hour of day, a month folded onto one week

    A month folded onto one week — when your window actually opens.

  3. Every project and model, ranked by what it billed

    Ranked by billed tokens. Pick a project to narrow everything to it.

  4. The range and the project live in the URL

    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

Everything you need to keep sessions moving

Limits, live status, token usage and history, on one page.

  • Both limits, at the top

    Your five-hour and weekly usage, when they reset, and when they run out.

  • A heads-up before you hit one

    A desktop notification when a window is on course to run out. Off until you turn it on.

  • Where the tokens went

    Spend per day, per half hour, per project. Pick a project to narrow the page.

  • What the spend was made of

    Oversized sessions, standing context, model mix — only when something is unusual.

  • Active sessions, verified twice

    Checked against the OS, so working means working.

  • Recent sessions, every project

    Title, prompts, model and branch — find the one worth resuming.

  • A panel per session

    Counts, tokens, working time, subagents, and a copyable resume command.

  • The standing cost, itemised

    What fills the window up front — CLAUDE.md, skills, tools, MCP — priced block by block.

  • Open at login

    autostart on adds it to your login items. The page is waiting when you sit down.

  • Token usage you can sort by

    Coloured by context share, so you see what's about to compact.

  • Scriptable output

    --json prints the page's payload. The HTTP API is open too.

  • Fully keyboard driven

    Filter, move, open and close — all from the keyboard.

  • No dependencies, no install scripts

    Nothing to install or configure. Works the same on npm, pnpm, yarn and bun.

  • Local by construction

    Loopback only, never writes to your Claude directory. One outbound call, off with --offline.

Quickstart

Run it with any package manager

No install needed. Or use Homebrew to keep it on your PATH.

npx claude-code-session-tracker
  1. Run it

    No install step. It starts a local server and opens your browser.

  2. Open the printed address

    Served at http://127.0.0.1:3099.

  3. Watch your sessions

    Refreshes every 2 seconds. Click a row for details.

Start at login

New

Open your dashboard every time you log in

One command adds it to your login items. Another takes it out.

brew install meyusufdemirci/tap/claude-code-session-tracker
claude-code-session-tracker autostart on

Added as a Login Item, listed in System Settings → General → Login Items.

To turn it off:

claude-code-session-tracker autostart off
  1. Install it once

    A login item needs a copy that stays on disk, so npx won't do here.

  2. Turn it on

    One command, no admin rights. It starts the tracker right away, too.

  3. Log in

    The dashboard opens at http://127.0.0.1:3099 every time.

Command line

Options

Every flag, command and keyboard shortcut.

Flag or commandDescriptionDefault
-p, --port <number>Port to listen on, stepping forward up to 20 times if taken3099
--host <address>Address to bind. Anything but loopback drops the guard, and the CLI says so127.0.0.1
--no-openDo not open a browser—
--jsonPrint the session list as JSON and exit—
-n, --limit <number>How many sessions to list. Running sessions always show50
--claude-dir <path>Override the Claude data directory~/.claude
--offlineNever ask Anthropic's server for the usage limits; the cards fall back to Claude Code's cached readout or an estimate—
autostart onStart at login and open the page, on macOS and Windows. Starts it now, too—
autostart offStop starting at login—
autostart statusSay whether it starts at login—
-h, --helpShow usage—
-v, --versionShow the version—

On the page

  • /Jump to the filter
  • ↑↓Move between sessions, across both tables
  • HomeEndFirst and last session
  • ↵Open the selected session
  • EscClose the panel, or clear the filter

Scripting

An HTTP API, and JSON on stdout

Anything the page does, you can do with curl.

MethodRoute
GET/api/sessions?limit=N

The 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/:id

One session with counts, tokens, models, activeMs, awaySummary, and notes.

GET/api/limits

Both 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/advice

The findings behind the `Where it goes` panel as measurements, not sentences. Same params as the history route; defaults to 7 days.

GET/api/health

Status, version, the Node it runs on, the resolved Claude directory, and per-source status.

POST/api/sessions/:id/reveal

Shows 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

Your transcripts never leave this machine

Read-only, loopback-only, and no telemetry.

  • Never writes to your Claude directory

    It only reads what Claude Code already wrote.

  • Loopback only

    Binds to 127.0.0.1 and rejects other hosts, so no website can reach it.

  • One outbound call, and --offline

    Only Claude Code's usage endpoint. No telemetry, no analytics.

  • No dependencies, no install scripts

    Nothing third-party runs on your machine.

What it reads

PathUsed for
~/.claude/sessions/<pid>.jsonRunning sessions and their live status
<session cwd>/.git/HEADThe branch a running session is on
~/.claude/projects/**/*.jsonlSession history — titles, prompts, models, branch
~/.claude/projects/*/*/subagents/agent-*.jsonlSubagent turns, for the limit windows they bill to
~/.claude.jsonThe usage readout Claude Code caches — how full each limit is, and when it resets
Keychain · ~/.claude/.credentials.jsonThe token Claude Code is signed in with, to ask for the same readout /usage shows. Skipped with --offline

FAQ

Questions, and the honest answers

Who made this

Yusuf Demirci

Yusuf Demirci builds developer tools at Nefarius Apps, and wrote claude-code-session-tracker after losing track of one too many Claude Code sessions.

One command. No more guessing which session needs you.

Node 20 or newer · macOS, Linux, and Windows. MIT licensed.

npx claude-code-session-tracker