densilo

Free token report

Where did my tokens go?
One command, offline.

See what Claude Code and Codex actually sent to the model this week: how much was history it had already sent, which tool output keeps coming back, and how often it read the same file twice. No install, no account, nothing uploaded.

Run it

curl -fsSL https://densilo.com/tokens.py | python3 -

Look further back with | python3 - --days 30. It needs Python 3.8 or later and nothing else. Prefer to read it first? It's one short file: densilo.com/tokens.py, also on GitHub.

What you'll see

From one of our own machines:

Claude Code  ·  36 sessions active in the last 7 days
  Re-sent history:       98% of input was history it had already sent
  Old tool output:       62% of what gets re-sent is tool output, not conversation
  Files read twice:      48% of file-read output was a file it had already read

  What it keeps re-sending:
    command output                  35%  █████████
    tool calls the agent made       22%  █████
    browser pages and screenshots   14%  ████
    file reads                      10%  ██
    the agent's replies              8%  ██
    your messages                    4%  █

Totals and percentages only. It never prints file names or what was in your sessions.

Why the numbers are that big

Every request re-sends the whole session so far. Caching makes the repeats cheaper, but they still count, and on long sessions they are most of the input. Most of what gets re-sent isn't the conversation; it's old command output, file reads and screenshots. More on that in why Claude Code uses so many tokens and Codex token usage.

Privacy and method

  • Does it upload anything? No. It reads the session files Claude Code and Codex already keep on your machine, prints totals and percentages, and exits. It makes no network request, calls no model, needs no account and writes nothing to disk.
  • What does it read? Claude Code sessions under ~/.claude/projects and Codex sessions under ~/.codex/sessions that were active in the last 7 days (change it with --days). It never prints file names or session contents.
  • How is "re-sent history" measured? From the token counts the provider recorded for each request: input served from the cache is history the agent had already sent. The breakdown by content weighs each piece by how many later requests carried it again, until a compaction cleared it.

What helps

Start a fresh session or compact between tasks, keep command output short, and avoid re-reading files the agent already has. Densilo does the tool-output part automatically and keeps the full text recoverable. How to reduce Claude Code token usage.

Trim the re-sent part automatically.

Densilo runs on your machine between the agent and the model and sends old tool output in short form, with the full text kept so the model can fetch it back. On long sessions in our replays: up to 53% fewer tokens on Claude Code and up to 57% on Codex.