/insights: lines/files metrics ignore subagent edits, undercount by 10×+
Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 1, 2026
lines_added / lines_removed / files_modified in ~/.claude/usage-data/session-meta/*.json (and the report header built from them) appear to count only Edit/Write calls in the main thread. Edits made by subagents (Agent tool) are not counted.
Evidence from my sessions:
- 34 commits →
lines_added: 115, 1 main-thread edit, 22 Agent calls - 32 commits →
lines_added: 27, 3 main-thread edits, 18 Agent calls - Report header: +62,044 / −1,982. Git for one repo over the same period: +577k / −162k (upper bound,
--all, no dedup).
Removals are almost always ~0, so refactoring and cleanup work is invisible.
Suggestion: include subagent transcripts in the counts, or derive lines from git diff --shortstat of commits made during the session. At minimum, label the metric "main-thread edits" so it isn't read as total impact.
Platform: Windows 11, Claude Code desktop app.