Session Metrics
Overview
Section titled “Overview”Navi tracks token usage, time, and tool activity for each session. Metrics are displayed as inline badges in the session list and in a detailed metrics view.
Inline Display
Section titled “Inline Display”Each session row can show metric badges:
⏱ 1h 23m 🔧 45 📊 57k tokens- Time: Total session duration
- Tools: Number of tool invocations
- Tokens: Total token usage (input + output)
Detail View
Section titled “Detail View”Press i on a selected session to open the metrics detail view with full breakdowns.
Token Metrics
Section titled “Token Metrics”Token usage is extracted from Claude Code session transcript files at ~/.claude/projects/. Navi maps a session’s working directory to its transcript by converting the path (e.g., /home/sean/workspace/navi becomes -home-sean-workspace-navi) and reading the most recently modified .jsonl file.
Token breakdown:
- Input tokens: Tokens sent to the model
- Output tokens: Tokens generated by the model
- Cache tokens: Cache read + cache creation tokens
Thresholds:
- Warning (yellow): 100k tokens
- Critical (red): 500k tokens
Format examples: 0, 500, 1.2k, 45k, 1.5M
Time Metrics
Section titled “Time Metrics”- Total duration: Time since session started
- Working time: Time actively processing
- Waiting time: Time waiting for user input
Format examples: 45s, 5m, 1h 23m, 2h
Tool Metrics
Section titled “Tool Metrics”Tracked by the tool-tracker.sh hook script:
- Recent tools: Last 10 tools used (e.g., Read, Write, Bash)
- Tool counts: How many times each tool was invoked
How It Works
Section titled “How It Works”- The
notify.shhook writes time metrics (start time, status transitions) to session JSON - The
tool-tracker.shhook increments tool counts on eachPostToolUseevent - Token metrics are read from Claude Code’s JSONL transcript files
- All metrics are aggregated and displayed in the TUI
Related Features
Section titled “Related Features”- Session Monitoring — Session status tracking