claude-code - 💡(How to fix) Fix Feature request: date range filter for /insights [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58577Fetched 2026-05-14 03:44:41
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
labeled ×2commented ×1

The /insights command currently analyses all available sessions with no way to scope the analysis to a specific time period. A date range filter would allow users to focus on recent usage patterns and track improvement over time.

Root Cause

The /insights command currently analyses all available sessions with no way to scope the analysis to a specific time period. A date range filter would allow users to focus on recent usage patterns and track improvement over time.

Fix Action

Fix / Workaround

Current workaround

Code Example

/insights --since 30d        # last 30 days
/insights --since 2026-04-01 # since a specific date
/insights --since 7d --until 2026-05-01  # specific window
RAW_BUFFERClick to expand / collapse

Summary

The /insights command currently analyses all available sessions with no way to scope the analysis to a specific time period. A date range filter would allow users to focus on recent usage patterns and track improvement over time.

Proposed solution

Add --since and/or --until flags to /insights:

/insights --since 30d        # last 30 days
/insights --since 2026-04-01 # since a specific date
/insights --since 7d --until 2026-05-01  # specific window

Why this is useful

  • Track improvement over time — after changing CLAUDE.md rules or adding hooks, you want to see whether friction events decreased in just the recent sessions, not diluted across months of historical data
  • Compare periods — run insights for last month vs. this month to see trends
  • Reduce noise — older sessions may reflect a different codebase, team, or workflow that's no longer relevant

Current workaround

None — the only option would be manually deleting older session files from ~/.claude/usage-data/facets/, which is destructive.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING