[BUG] /insights report samples only ~0.3% of sessions, producing unrepresentative analysis
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The /insights command generates a usage report, but the underlying analysis only samples a tiny fraction of actual sessions. In my case, only 7 out of 2,443 sessions (0.3%) were captured in the facets data (~/.claude/usage-data/facets/) that feeds the report.
This causes the report to heavily over-index on whichever project happens to appear most in the small sample. 3 of my 7 sampled sessions were from one project (a workout dashboard), so the entire report narrative — friction analysis, suggestions, interaction style — was dominated by that single project while multiple other projects were barely mentioned or completely absent.
The "At a Glance" summary, friction analysis, and suggestions all read as if I only work on one project, which is misleading.
What Should Happen?
The insights report should sample a representative cross-section of sessions so the analysis reflects the user's actual breadth of work. Suggestions:
- Increase the sample size significantly, or stratify sampling across distinct project directories so no single project dominates
- - At minimum, surface a disclaimer about sample size so users know the report may not be comprehensive
- - - Consider grouping/weighting by project so the narrative covers all areas of work proportionally
Error Messages/Logs
Steps to Reproduce
- Use Claude Code extensively across multiple different projects (2,400+ sessions over ~25 days in my case)
- 2. Run
/insights - 3. Check the facets directory (
~/.claude/usage-data/facets/) — only 7 JSON files were generated - 4. Observe that the report narrative is heavily skewed toward whichever project got the most representation in the tiny sample
- 5. Note that the report's suggestions, friction analysis, and interaction style description don't reflect the full breadth of work
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.31 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Facets directory (~/.claude/usage-data/facets/) contained only 7 JSON files for 2,443 total sessions. The 7 sampled sessions broke down as:
- 3 sessions: Workout dashboard / Strava+Whoop integration
- - 1 session: Google Docs template automation (Apps Script)
- - - 1 session: School quality data visualization (3K site)
- - - - 1 session: File transfer service with Slack reporting
- - - - - 1 session: Viewing the insights report itself
Projects that were completely unrepresented likely number in the dozens given the total session count. The report read as a single-project analysis rather than a comprehensive usage report.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗