Skip to content

fix: correct history token counts, project grouping, and MCP tool rows - #60

Merged
stefanprodan merged 1 commit into
mainfrom
fix-history-stats
Sep 23, 2026
Merged

stefanprodan merged 1 commit into
mainfrom
fix-history-stats

Conversation

@stefanprodan

Copy link
Copy Markdown
Owner

Three fixes to the history (h) view:

  • Token overcount: Claude Code writes each content block of a message (thinking, text, tool_use) as its own entry, each repeating the message's usage. Count a message once by its id: input once, output at its final value, one turn. Tool calls still count from every block.
  • Projects swallowed by a parent dir: a single session started in a parent directory (e.g. an org dir holding every repo) made every repo beneath it fold into that one row. Only fold child paths that have no sessions of their own.
  • Duplicate MCP rows: one server installed both standalone and as a plugin shortened to the same server:tool label but ranked as separate rows. Sum counts per displayed label.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan
stefanprodan merged commit 72bf13e into main Sep 23, 2026
2 checks passed
@stefanprodan
stefanprodan deleted the fix-history-stats branch September 23, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant