Usage stats heatmap credits all activity to the session start date; days worked in long-running sessions show as zero
Environment
- Claude desktop app 1.20186.1 (bundled Claude Code), macOS (Darwin 24.3.0)
- Stats widget on the home screen ("What's up next") — Overview tab with Sessions / Messages / Total tokens / Active days / streaks and the activity heatmap
Bug
The activity heatmap (and, apparently, "Active days" / "Current streak") credits all of a session's activity to the day the session was started, not to the days the messages were actually sent. For users who keep long-running sessions open for many days, this produces false-zero days: the heatmap shows an empty cell on a day with hundreds of user messages, and "Current streak" shows 0d during continuous daily work.
Evidence (from local ~/.claude/projects/**/*.jsonl transcripts)
July 10, 2026 is shown as an empty day on the heatmap, and the streak reset to 0. Counting "type":"user" entries by timestamp across all transcripts for that day:
| Session | Started | Last message | User messages on Jul 10 |
|---|---|---|---|
| 1ba3a3f4-... | 2026-07-05 | 2026-07-11 | 147 |
| 8f953dca-... | 2026-07-09 | 2026-07-11 | 129 |
| e18c27c3-... | 2026-06-23 | 2026-07-10 | 3 |
~280 real user messages on Jul 10, but no session was created that day — so the day renders as zero. Same pattern on Jul 7 (~540 user messages, all in sessions started Jul 1/5/6) and on several June days. Days on which new sessions were started render as heavily filled instead, since they absorb the whole multi-day session.
A secondary effect: automatic transcript cleanup deletes old session files, so once a session file is removed, every day it covered goes blank retroactively — the "All" range of the heatmap can never be accurate.
Expected
Bucket activity by message timestamps within each transcript (the data is already there in the jsonl), not by session creation date. Active days, streaks, and the heatmap should reflect days when messages were actually exchanged.
Actual
Days spent working exclusively in previously-started sessions show zero activity; streaks reset despite daily use.