agentmeterv0.1.1

CASOON Open Source

See where your agent tokens go.

agentmeter reads the session logs Claude Code and Codex already write to your disk and explains your usage: context size, cache rebuilds, session length, the size of the first request. Each number comes with its evidence and what it does not prove. Read-only, local, no network; only --probe starts another program, Claude Code itself.

cargo install agentmeter
MITRustEarly development — 0.x
agentmeter --findings
agentmeter · Claude Code · last 7 days

READ
  ✓ logs      1,299 files, 856,227 lines from ~/.claude/projects · version
              2.1.170 – 2.1.309
  ✓ observed  2026-06-14T17:33:36Z – 2026-10-30T19:35:35Z · 130,425 requests in all
  ✓ quality   every line readable
  ✓ rules     5 of 5 measurable in this source
  ✓ probe     /context in 4 of 4 places (empty directory, web-casoon-dev, kestrel,
              chartlet); answered locally, no model request · claude -p /context
              --no-session-persistence --output-format json

FINDINGS   ? 3 to look at   ✓ 1 fine   ✓ 1 nothing found
────────────────────────────────────────────────────────────────────────────────────────

? baseline-load                                      look at it · notice · observed · v1
  ⇒ today's configuration is 34k of the median start 79k (43 %); 34k more is in every
    start (front end, project instructions, a short first prompt) and 11k varies per
    session; 146 of 146 starts came from claude-desktop, whose own instructions and
    tools /context in the CLI does not see; project kestrel adds 8k (project
    instructions or MCP servers)

    spread of session starts                         ├──┃━━───────┤
      smallest 68k · quartiles 76k / 87k · median 79k · largest 114k
    median start, split            ██████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░     79k
      █ configuration (/context, empty directory)                       34k
      ▓ rest of the smallest start                                      34k
      ░ varies per session (median minus smallest)                      11k

What it does

Generated at build time

All examples →
agentmeter  Claude Code   last 7 days

requests       30,590      sessions   135
input          7.9 G tokens  cache read 98 %
output         23.0 M tokens
compactions    30  (auto 30, manual 0)

projects by input
  chartlet   21 %    kestrel   17 %    web-casoon-dev   13 %

Summary view with figures from one author's Claude Code logs over seven days. The tool is in early development.

examples/summary.ansi

New in v0.1.1

Changelog →

Quickstart

Install it, run it. On a terminal it opens a menu; with a flag or in a pipe it prints text.

  1. Install with cargo install agentmeter, or take a binary from the GitHub releases.
  2. Run agentmeter and open a row, or name a view: agentmeter --findings.
  3. Narrow it with --tool codex, --since 7d or --project <name>.
Usage
agentmeter                      # menu on a terminal
agentmeter --findings           # rules with measure, evidence and next step
agentmeter --tool codex --since 7d
agentmeter --json               # the same data, one entry per source
agentmeter --check data-quality # exit 1 on unreadable or missing data

Frequently asked questions

How is this different from tools like ccusage?

Existing tools aggregate tokens and cost. agentmeter derives hints from the same logs and states how sure each one is. Claude Code has its own /usage recommendations; agentmeter adds a view across sessions and across Claude Code and Codex, and shows data gaps.

Which agents are supported?

Claude Code and Codex CLI are the targets. Other agents are possible later because every source is its own adapter.

Can it show my remaining subscription quota?

No. Subscription limits are not stored locally, so agentmeter cannot know how much of a quota is left.

Is it released?

Yes, as 0.x: on crates.io and as signed binaries for macOS and Linux on the GitHub releases. Output and JSON may still change between minor versions; the changelog lists every change.

Find out where your tokens go.

Read the documentation