Measurement
Analytics
Analytics summarizes how Claude Code and Codex sessions convert prompts, tokens, time, tool calls, and permission checkpoints into project output.
Scope
Analytics is project-scoped. When a project is selected, the view analyzes only sessions whose working directory belongs to that project. Claude Code appears as CC; Codex appears as CX.
Data Sources
| Input | Claude Code | Codex |
|---|---|---|
| Transcripts | ~/.claude/projects/<encoded-cwd>/*.jsonl | ~/.codex/sessions, ~/.codex/archived_sessions |
| Session index | Project JSONL and task directories | ~/.codex/state_5.sqlite, ~/.codex/session_index.jsonl |
| Tool calls | tool_use content items | Function calls, tool events, command records |
| Permission checkpoints | hook_permission_decision transcript attachments | sandbox_permissions=require_escalated and app approval log when present |
Normalized Session Fields
The parser normalizes each transcript into fields such as session ID, title, engine, last modified date, active duration, input/output tokens, tool calls, failed tool calls, changed files, added and removed lines, artifacts, todos, prompts, permission requests, risks, and per-tool usage records.
Active Time
Active time is based on transcript event deltas, with idle gaps capped at five minutes. This avoids counting a resumed overnight session as a full wall-clock work block. When timestamps are unavailable, analytics falls back to file creation and modification dates.
active time = sum(min(delta between adjacent events, 5 minutes))
Core Metrics
| Metric | Meaning |
|---|---|
| Score | 0-100 project-level indicator combining delivery, token efficiency, and risk penalty. |
| Artifacts | Maximum of parsed changed files and completed todos; changed files are counted when added lines exist. |
| LOC | Added lines plus removed lines, with added and removed totals shown separately. |
| Tokens | Input plus output token counts, displayed in compact units. |
| Time | Active duration, displayed as compact day/hour/minute values. |
| Risks | Risk events and permission-related signals extracted from transcripts and approval data. |
Widgets
- Header cards summarize score, artifacts, LOC, tokens, time, and risks.
- Activity heatmap shows sessions, tokens, artifacts, and risk count by day.
- Tokens vs Output compares token usage against artifact/file/todo output.
- Agent Comparison compares sessions, tokens, time, files, LOC, risk, and throughput by engine.
- Session Productivity lists recent sessions and their concrete output.
- Tool Usage shows tool call volume, failures, commands, and risk-heavy operations.
Interpreting Results
High tokens with low output usually means the session explored, stalled, or needed more focused prompting. High throughput with low risk is a strong session. Permission-heavy sessions are not automatically bad; they often indicate legitimate work across files, git, or dependencies, but they deserve review.