tokenstat found no sessions
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 tokenstat found
Start with this command:
tokenstat doctor
doctor reports which sources are present on the device, 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 device 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 device, 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 normally removes transcripts after 30 days. If you installed tokenstat after a long gap, detailed sessions may be missing. Its coarser rollup can recover some daily/model totals, but cannot restore all session details.
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.
Install before you need the data. Scheduled scans preserve usage before tools delete their logs.
Still nothing
If doctor shows a source as present but the report stays empty, that is likely a bug, not 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.
Related
- Which tools tokenstat reads lists every source and where its usage lives.
- Install tokenstat covers the scheduled scan and why it matters.
More in Troubleshooting
