tokenstat
tokenstat
Troubleshooting

tokenstat found no sessions

György
Reviewed by
György
Updated Jul 30, 2026 3 min

An empty report is not a failure to count. It means no readable session data was found, and there are only a few reasons that happens. Work down this list in order.

1. Check what was actually found

Start here rather than guessing:

tokenstat doctor

doctor reports which sources are present on the machine, what it managed to read, and how much Claude Code history has already been lost. Most of the time the answer is on this screen and the rest of the page is unnecessary.

2. The tool has not written anything yet

A freshly installed coding tool has no session logs, and tokenstat cannot count what does not exist. Have a real conversation in the tool first, then scan:

tokenstat scan

3. The tool does not record usage on disk

This one is not fixable by scanning harder. Cursor writes no token counts to disk at all, so a Cursor-only machine will legitimately show nothing until you connect it through its API instead:

tokenstat auth cursor

Antigravity IDE sessions need the Antigravity app open so tokenstat can reach its local language server:

tokenstat fetch

Antigravity's CLI conversations are read offline and need none of that. The full picture is in which tools tokenstat reads.

4. The logs are somewhere non-standard

tokenstat looks in each tool's default location. If you have moved a data directory, set a custom home, or run tools inside a container or a VM, the files may be somewhere it does not look. Confirm the logs exist where you think they do:

ls ~/.claude/projects        # Claude Code
ls ~/.codex/sessions         # Codex
ls ~/.copilot                # Copilot CLI

If they are elsewhere, the surest fix is to run tokenstat as the same user, on the same machine, with the same HOME as the tool that wrote them.

5. It is running as the wrong user

Session logs live under a user's home directory. Running tokenstat with sudo, or as a service account, points it at a different home with no logs in it. Run it as yourself.

6. The history is genuinely gone

Claude Code deletes its transcripts after 30 days. If you installed tokenstat after a long gap, the usage from before that window was already deleted by the tool that wrote it, and nothing can recover it.

tokenstat doctor compares your archive against Claude Code's own rollup and tells you how much has been lost. Some of it can be recovered from that coarser rollup, which is why the reports carry a separate "Claude Code (recovered)" source.

This is the argument for installing before you get curious rather than after. The scheduled scan exists to capture usage before your tools clean up after themselves.

Still nothing

If doctor shows a source as present but the report stays empty, that is a bug worth reporting rather than a configuration problem. Open an issue on the repository with the doctor output. Do not paste session log contents into an issue: they contain your prompts and your code.