Insights report inflates session count by including agent subtasks
Description
The /insights command reports an inflated session count by apparently counting Task agent spawns as separate sessions.
Example
My insights report claimed:
- 1,719 sessions over 26 days (66/day average)
But ~/.claude/stats-cache.json shows the actual count:
- 118 sessions over the same period (~4.5/day average)
The 14.5x inflation correlates with heavy Task tool usage reported in the same insights (1,565 TaskCreate + 2,709 TaskUpdate calls).
Expected behavior
The session count should reflect user-initiated sessions, not include spawned subagents. Alternatively, the report could break this out explicitly (e.g., "118 sessions spawning 1,601 agent tasks").
Impact
This inflates the "power user" narrative and makes metrics like "670 hours across 1,719 sessions" misleading when calculating per-session averages or understanding actual usage patterns.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗