Making sense of local AI token usage

Hina shows where Claude Code and Codex sit in a day in three ways: the prompts you sent, the token counts in their local logs, and the projects their sessions ran in. Two switches control them. This is the map, with what each view can and cannot tell you.
Three views, two switches
Hina reads the session files that Claude Code and Codex leave on your Mac, and what it takes depends on the switches in Settings, Privacy. Read agent sessions brings in your own prompts, the session times, the working directory, the branch and the file paths that edit tools touched. AI usage metadata brings in model names, project paths, timestamps and token counts. Both are off by default and independent, so enabling prompts does not turn on usage, and the reverse holds too. The third view, recognizing projects from sessions, uses the same switch as prompts.
They appear in different places. Prompts show in Day under What you asked AI, in the daily report, and in Search records. Usage shows as AI in your work in the daily report, and once that day's report has been built, Day shows the same snapshot. Session times and working directories help Hina name the project for time spent in apps with no readable title, which comes up below. None of the three reads assistant replies or tool output.
The usage section lives inside the daily report, so like the report it is available during the trial of seven recorded days and after you activate a license.
What the prompt view tells you
Prompts are the most direct trace of intent. Day lists the latest conversations and lets you open the original wording, and the daily report puts what you asked under each project next to its local commits. A prompt shows what you asked for. It cannot show whether the request worked, because Hina does not read the reply. Whether something was done is for the repository, the tests and the delivery channel to say.
Prompts are searchable too. Search records matches words in a prompt along with the project name, so a month later you can still find that conversation with a phrase like why the export broke. A prompt that looks like it carries a credential, such as a token, a password, an email address or a license key, is left out of search and reports altogether.
What the usage view counts
With AI usage metadata on, building a daily report scans the Claude Code logs under ~/.claude/projects and the Codex logs under ~/.codex/sessions and ~/.codex/archived_sessions. The AI in your work section first states the selected day's input and output, then draws a seven-day bar chart ending on that day, with one bar per day for input plus output tokens, and hovering over a bar shows the two apart. When the day used more than one project, a list under the chart gives each project's tokens. The report adds a table with the columns Project, Tool and model, Input tokens, Output tokens and Cache reads.
The numbers come straight from the logs. Claude Code attaches a usage record to each response and writes the same response several times while it streams, so Hina keeps the largest snapshot of each response instead of adding them. Codex logs a running total after each turn, so Hina subtracts the previous total to get what the turn added. Copies of one thread in the live and archived folders are deduplicated, and a thread forked from another does not count the inherited part twice.
Input includes cached tokens. Cache reads are the part of the input served from cache, listed separately so you can see it, and they are not added a second time. In Claude Code's raw log the input field leaves cache out, so Hina adds cache reads and cache writes to it. Output is what the model wrote back and is usually far smaller than input. The chart plots the two together, and the table keeps them apart.
How days and projects are assigned
A day runs from 4 a.m. to 4 a.m., as everywhere in Hina, so a request at 1 a.m. belongs to the previous day. Codex files its threads in folders named for the day they were created, but Hina assigns tokens by the time of each event. Reopening an old thread today puts its usage on today.
Projects are named by repository root. A session that moved into src or docs, or ran in a git worktree, is named after its repository, and when one name covers several folders, each row is prefixed with its parent folder. A session with no working directory shows as Unassigned project.
Prompts are not paired with token events by how close their timestamps are. A prompt and a burst of usage a minute apart appear in different places and are not joined, because closeness in time cannot tell you which request produced which tokens.
What the numbers are not
A token count is not a request count, not time worked, not an outcome and not a bill. Hina loads no prices and estimates no cost, since plans, discounts and caching rules differ. For charges and remaining allowance, use the account page of Claude or Codex, which Hina cannot see.
Time spent with an agent is recorded elsewhere. The Trail shows the app that was in front, so an hour waiting on Claude Code while reading documentation in a browser is browser time, and a day with many tokens can sit beside a small Deep work number. They measure different things. Hina uses prompts and session times only where the evidence is direct, to name the project for time in an app with no readable title such as a terminal or the Claude and Codex desktop apps. It does not turn tokens into hours.
When a number looks wrong
If a log is truncated, malformed or too large for the read budget, the section says Some local logs could not be fully read or interpreted. Treat those figures as a lower bound. Each tool gets about 2 GB of reading for the selected day, spent on the most recently modified logs first, plus up to about 512 MB for the six earlier days in the chart, and a shortfall there affects only those earlier bars.
A section reading No usable AI usage records for this day does not mean no AI was used. The logs may sit somewhere Hina does not look, the tool may be one it does not read, such as Cursor, or the switch may be off. To check a figure, pick one project and add up its input and output for the day from the logs by hand, adding the two separately and not adding cache again. In a terminal, Hina --daily prints the same report, including this section.